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
Why are dynamic link library used over static one?
What is difference between an Structure and Class?
How does return work in c#?
Is c# code is managed or unmanaged code?
What is the use of xmlserializer?
What's the c# syntax to catch any possible exception?
What is the difference between method parameters and method arguments. Give an example?
What are types in c#?
How big is a 64 bit integer?
What is the difference between paramaterized constructor and copy constructor?
What is a constructor in c#?
Will the following code compile and run?
In c#, what will happen if you do not explicitly provide a constructor for a class?
Write a program in c# to find the angle between the hours and minutes in a clock?
What are fields in c#?