string name = instanceVariable.GetType().Name;
|
||||||
|
string name = instanceVariable.GetType().Name; In Jabber-net library, which I am using for my client, I saw this piece of code, which basically stores an array of type-unsafe properties. It is a useful idiom to have in mind for C# developers. /// <summary> /// Sets or retrieves a connection property. /// You have to know the type of the property based on the [...] ConfigurationManager class is used to load settings from an XML file at the start of an application. Usually people edit it outside the application (manually with a text editor), however, it is possible to change configuration inside the program: http://blog.sb2.fr/post/2008/11/29/HowTo-Modify-Configuration-File-Programmatically-with-C.aspx The Jabber-Net library uses this function to update its configuration file instead: /// <summary> /// Write the current connection [...] |
||||||
|
Copyright © 2010 Stealth Startup Blog - All Rights Reserved |
||||||