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


Please Help Members By Posting Answers For Below Questions

What is the solution if you need to manipulate sets of items?

479


What are Uses of CLR

540


How do we achieve encapsulation in c#?

494


What is tuple in c#?

540


What are the Types of caching

550






What is different between Boxing and Unboxing?

596


Why do we use yield in c#?

514


Is c# queue thread safe?

508


What is type safe in c#?

495


Can namespace contain the private class?

501


Is dll a library?

502


What is the concept of strong names?

547


What is asp net c#?

514


Can we write class inside a class in c#?

551


What is the difference between overriding and overloading in systemverilog?

467