Click here to Skip to main content
15,902,198 members
Home / Discussions / C#
   

C#

 
GeneralSQL/C# Pin
Harry20005-Oct-03 12:18
Harry20005-Oct-03 12:18 
GeneralRe: SQL/C# Pin
mistery225-Oct-03 13:41
mistery225-Oct-03 13:41 
GeneralRe: SQL/C# Pin
Mike Ellison5-Oct-03 14:16
Mike Ellison5-Oct-03 14:16 
GeneralRe: SQL/C# Pin
Harry20005-Oct-03 17:28
Harry20005-Oct-03 17:28 
GeneralRe: SQL/C# Pin
mistery226-Oct-03 0:13
mistery226-Oct-03 0:13 
GeneralDB IV .DBF Databases Pin
gmhanna5-Oct-03 9:33
gmhanna5-Oct-03 9:33 
GeneralRe: DB IV .DBF Databases Pin
Randhir Sinha6-Oct-03 2:05
Randhir Sinha6-Oct-03 2:05 
GeneralRuntime Object state. Pin
Anonymous5-Oct-03 8:39
Anonymous5-Oct-03 8:39 
Hi all.
I am a new learner of c-sharp and also this is my first mail in this group.I hope I will got my answer from here...
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(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 to all helpers.
GeneralRe: Runtime Object state. Pin
Blake Coverett5-Oct-03 10:31
Blake Coverett5-Oct-03 10:31 
Questionprinter minimum margins?? Pin
mistery225-Oct-03 7:59
mistery225-Oct-03 7:59 
AnswerRe: printer minimum margins?? Pin
Nick Parker5-Oct-03 9:29
protectorNick Parker5-Oct-03 9:29 
GeneralRe: printer minimum margins?? Pin
mistery225-Oct-03 12:04
mistery225-Oct-03 12:04 
GeneralDataGrid and multiple threads Pin
ke5in5-Oct-03 5:32
ke5in5-Oct-03 5:32 
Questionwhich one is faster? Pin
abc8764-Oct-03 13:07
abc8764-Oct-03 13:07 
AnswerRe: which one is faster? Pin
J. Dunlap4-Oct-03 13:41
J. Dunlap4-Oct-03 13:41 
GeneralRe: which one is faster? Pin
leppie4-Oct-03 23:49
leppie4-Oct-03 23:49 
GeneralRe: which one is faster? Pin
J. Dunlap5-Oct-03 9:46
J. Dunlap5-Oct-03 9:46 
GeneralRe: which one is faster? Pin
leppie5-Oct-03 13:36
leppie5-Oct-03 13:36 
GeneralRe: which one is faster? Pin
J. Dunlap5-Oct-03 13:56
J. Dunlap5-Oct-03 13:56 
GeneralRe: which one is faster? Pin
David Stone5-Oct-03 14:28
sitebuilderDavid Stone5-Oct-03 14:28 
GeneralRe: which one is faster? Pin
J. Dunlap5-Oct-03 14:32
J. Dunlap5-Oct-03 14:32 
GeneralRe: which one is faster? Pin
J. Dunlap5-Oct-03 15:12
J. Dunlap5-Oct-03 15:12 
GeneralRe: which one is faster? Pin
zecodela5-Oct-03 18:06
zecodela5-Oct-03 18:06 
GeneralRe: which one is faster? Pin
J. Dunlap5-Oct-03 18:18
J. Dunlap5-Oct-03 18:18 
AnswerRe: which one is faster? Pin
WillemM5-Oct-03 21:05
WillemM5-Oct-03 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.