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

Why we need get set property in c#?

539


What is an icollection in c#?

487


What does m mean in decimal c#?

496


What is a cs file?

516


Do extension methods have to be static?

539






What does out mean c#?

478


in object oriented programming, how would you describe encapsulation?

559


Is 0 an unsigned integer?

495


To create a localized application which namespaces are necessary?

521


What is delegate in c# interview questions?

492


Why we use get set property in c#?

470


How jit (just in time) works?

510


What is mvc in c#?

459


What is int16?

508


What is definition in c#?

477