So how do you retrieve the customized properties of a .NET application from XML .config file? Can you automate this process ?
Answer Posted / sudhanshu
Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable. In Visual Studio yes, use Dynamic Properties for automatic .config creation, storage and retrieval.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Do loops in c#?
What is the difference between proc. Sent by val and by sub?
what is method overloading in c#?
How long can a string be c#?
What is serialization in unity?
What is the difference between ref and out in c#?
What is equal c#?
What is an escape sequence in c#?
What is xml serialization and deserialization in c#?
Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?
Can mvc be used for desktop applications?
Difference between a sub and a function in c#.
Why do we need a singleton class?
What is the purpose of abstract class in c#?
What is executescalar in c#?