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

C#

 
AnswerRe: Process.WaitForInputIdle doesn't return Pin
Wjousts17-Oct-06 5:29
Wjousts17-Oct-06 5:29 
GeneralRe: Process.WaitForInputIdle doesn't return Pin
Anthony Mushrow17-Oct-06 6:08
professionalAnthony Mushrow17-Oct-06 6:08 
GeneralRe: Process.WaitForInputIdle doesn't return Pin
Judah Gabriel Himango17-Oct-06 6:14
sponsorJudah Gabriel Himango17-Oct-06 6:14 
QuestionRegarding Reflections Pin
ParagGupta17-Oct-06 4:46
ParagGupta17-Oct-06 4:46 
AnswerRe: Regarding Reflections Pin
Anthony Mushrow17-Oct-06 6:04
professionalAnthony Mushrow17-Oct-06 6:04 
AnswerRe: Regarding Reflections Pin
Ed.Poore17-Oct-06 8:14
Ed.Poore17-Oct-06 8:14 
GeneralRe: Regarding Reflections Pin
ParagGupta17-Oct-06 20:57
ParagGupta17-Oct-06 20:57 
GeneralRe: Regarding Reflections Pin
Ed.Poore17-Oct-06 21:16
Ed.Poore17-Oct-06 21:16 
Simple sample method:

public void SaveObject(object value)
{
    PropertyInfo[] properties = value.GetType().GetProperties();
    foreach (PropertyInfo property in properties)
    {
        SaveValue(propertyInfo.GetValue(value, null));
    }
}
Now you just call SaveObject with whatever object you want to save.  Note that SaveValue will have to inspect the object to see whether it's a primitive type or a complex (e.g. TextBox) and decide how to save it.  There is a property named IsPrimitive on the Type object I think which you can use to decide what to. do.



If you're stuck in a rut:
1) Consult the documentation*
2) Google it
3) Ask a sensible question
4) Try an ancient ritualistic knowledge summoning (Badger | [badger,badger,badger,badger...] Badger | [badger,badger,badger,badger...] Badger | [badger,badger,badger,badger...] ) dance Jig | [Dance]
5) Phone Green Alien | [Alien]
* - If the documentation is MSDN > 6.0 then forget it!

QuestionHow to GetType() a Nullable? Pin
Program.X17-Oct-06 4:13
Program.X17-Oct-06 4:13 
AnswerRe: How to GetType() a Nullable? Pin
Judah Gabriel Himango17-Oct-06 4:52
sponsorJudah Gabriel Himango17-Oct-06 4:52 
GeneralRe: How to GetType() a Nullable? Pin
Program.X17-Oct-06 5:08
Program.X17-Oct-06 5:08 
GeneralRe: How to GetType() a Nullable? Pin
Judah Gabriel Himango17-Oct-06 5:20
sponsorJudah Gabriel Himango17-Oct-06 5:20 
GeneralRe: How to GetType() a Nullable? Pin
Program.X17-Oct-06 6:33
Program.X17-Oct-06 6:33 
GeneralRe: How to GetType() a Nullable? Pin
Judah Gabriel Himango17-Oct-06 6:42
sponsorJudah Gabriel Himango17-Oct-06 6:42 
QuestionResolution independent application Pin
Robi-Robo17-Oct-06 3:56
Robi-Robo17-Oct-06 3:56 
AnswerRe: Resolution independent application Pin
Stefan Troschuetz17-Oct-06 4:34
Stefan Troschuetz17-Oct-06 4:34 
AnswerRe: Resolution independent application Pin
Wjousts17-Oct-06 4:35
Wjousts17-Oct-06 4:35 
Questiontab page disable question Pin
rzvme17-Oct-06 3:51
rzvme17-Oct-06 3:51 
AnswerRe: tab page disable question Pin
Thomas Chester17-Oct-06 7:03
Thomas Chester17-Oct-06 7:03 
QuestionMDI child problem... Pin
IamHuM17-Oct-06 3:45
IamHuM17-Oct-06 3:45 
AnswerRe: MDI child problem... Pin
Stefan Troschuetz17-Oct-06 4:18
Stefan Troschuetz17-Oct-06 4:18 
QuestionDataGridViewComboBoxColumn - Setting SelectedIndex Pin
KCI-VA17-Oct-06 3:31
KCI-VA17-Oct-06 3:31 
QuestionProblems with primary key Pin
mrclash88817-Oct-06 3:21
mrclash88817-Oct-06 3:21 
AnswerRe: Problems with primary key Pin
bearfx17-Oct-06 4:19
bearfx17-Oct-06 4:19 
AnswerRe: Problems with primary key Pin
Jim Conigliaro17-Oct-06 4:23
Jim Conigliaro17-Oct-06 4:23 

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.