All pastes #355226 Raw Edit

Stuff

public text v1 · immutable
·published 2007-02-14 11:03 UTC
rendered paste body
// for debugging purpose -  to be deleted
			Type myType = typeof(MailMessage);
			System.Reflection.FieldInfo[] fields = myType.GetFields();
			Console.WriteLine("Start fields");
			for (int i = 0; i < fields.Length; i++)
			{
				Console.WriteLine(String.Format("The field {0} has value {1}.", fields[i].Name, fields[i].GetValue(_msg)));
			}
			Console.WriteLine("End fields");
			// ------------------
			System.Reflection.PropertyInfo[] props = myType.GetProperties();
			Console.WriteLine("Start fields");
			for (int i = 0; i < props.Length; i++)
			{
				// Console.WriteLine(String.Format("The field {0} has value {1}.", props[i].Name, props[i].GetValue(_msg)));
			}
			Console.WriteLine("End fields");



			// end debugg