James sorry...my problem is still unsolved...so i m stating the problem again
My question is that I have made a method which accepts an Object type and I have displayed the real runtime type and methods of any object passed to the method. the code is as follow:
public void display_record (Object O)
{
Type tmptype = O.GetType();
FieldInfo[] tmpproperties = tmptype.GetFields();
Console.WriteLine("Type = " + tmptype);
Console.WriteLine("lenght" + tmpproperties.Length);
for ( int tmppi = 0 ; tmppi < tmpproperties.Length ; tmppi++)
{
Console.WriteLine("value = "+tmpproperties.GetValue(tmppi));
Console.WriteLine(tmpproperties[tmppi]);
}
}
Now i want to display the real values stored in the attributes of that object(like "ABC" stored in name attribute).How can i do that.Any idea??
Plz reply soon as help as I am in hurry n wana good solution ASAP.
Thanx again