Click here to Skip to main content
15,913,773 members
Home / Discussions / C#
   

C#

 
QuestionHow to get Value of An Object? Pin
EntManager10-Jan-07 4:37
EntManager10-Jan-07 4:37 
AnswerRe: How to get Value of An Object? Pin
Martin#10-Jan-07 4:42
Martin#10-Jan-07 4:42 
GeneralRe: How to get Value of An Object? Pin
Pete O'Hanlon10-Jan-07 4:50
mvePete O'Hanlon10-Jan-07 4:50 
GeneralRe: How to get Value of An Object? Pin
EntManager10-Jan-07 4:51
EntManager10-Jan-07 4:51 
QuestionObject Pin
Civic0610-Jan-07 4:29
Civic0610-Jan-07 4:29 
AnswerRe: Object Pin
ednrgc10-Jan-07 4:32
ednrgc10-Jan-07 4:32 
AnswerRe: Object Pin
Ravi Bhavnani10-Jan-07 4:33
professionalRavi Bhavnani10-Jan-07 4:33 
AnswerRe: Object Pin
Colin Angus Mackay10-Jan-07 4:34
Colin Angus Mackay10-Jan-07 4:34 
Civic06 wrote:
I have an object and want to call a method which will automatically go through all its properties and display its values.


Use reflection. Call GetType() to get the object's type (I presume that is also an unknown). From there you can GetProperties(). For each of the PropertyInfo objects you can now invoke the getter method. This will return the value of the property. It is then up to your application how to render that to the user.


Upcoming Scottish Developers events:
* Glasgow: Tell us what you want to see in 2007


My: Website | Blog | Photos

QuestionTrouble in parameter! Pin
nclauder10-Jan-07 4:04
nclauder10-Jan-07 4:04 
AnswerRe: Trouble in parameter! Pin
Colin Angus Mackay10-Jan-07 4:17
Colin Angus Mackay10-Jan-07 4:17 
AnswerRe: Trouble in parameter! Pin
Alaric_10-Jan-07 7:09
professionalAlaric_10-Jan-07 7:09 
GeneralRe: Trouble in parameter! Pin
Colin Angus Mackay10-Jan-07 10:20
Colin Angus Mackay10-Jan-07 10:20 
GeneralRe: Trouble in parameter! [modified] Pin
Alaric_10-Jan-07 10:42
professionalAlaric_10-Jan-07 10:42 
QuestionCheck for Filesystem Type NTFS / FAT .NET 1.1 [modified] Pin
Thomas Mihatsch10-Jan-07 3:49
Thomas Mihatsch10-Jan-07 3:49 
AnswerRe: Check for Filesystem Type NTFS / FAT Pin
jarellan10-Jan-07 3:51
jarellan10-Jan-07 3:51 
QuestionStreamWriter reuse? Pin
jarellan10-Jan-07 3:35
jarellan10-Jan-07 3:35 
AnswerRe: StreamWriter reuse? Pin
Guffa10-Jan-07 4:00
Guffa10-Jan-07 4:00 
GeneralRe: StreamWriter reuse? Pin
jarellan10-Jan-07 4:16
jarellan10-Jan-07 4:16 
GeneralRe: StreamWriter reuse? Pin
Colin Angus Mackay10-Jan-07 4:30
Colin Angus Mackay10-Jan-07 4:30 
GeneralRe: StreamWriter reuse? Pin
jarellan10-Jan-07 4:56
jarellan10-Jan-07 4:56 
AnswerRe: StreamWriter reuse? Pin
Guffa10-Jan-07 13:56
Guffa10-Jan-07 13:56 
GeneralRe: StreamWriter reuse? Pin
jarellan10-Jan-07 20:23
jarellan10-Jan-07 20:23 
Questionreading characters C# Pin
netJP12L10-Jan-07 3:32
netJP12L10-Jan-07 3:32 
AnswerRe: reading characters C# Pin
Not Active10-Jan-07 3:40
mentorNot Active10-Jan-07 3:40 
AnswerRe: reading characters C# Pin
Martin#10-Jan-07 3:42
Martin#10-Jan-07 3:42 

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.