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 are the types of serialization?

604


how to insert the data from the grid view to database table though button click.pls send the answer to mail id suri1319@gmail.com

1580


What is a method signature in c#?

592


Is stringbuilder faster than string concatenation c#?

561


Explain nullable types in c#?

625






Why we use get and set method in c#?

578


Why static variables are used?

611


Explain clr in brief.

639


Should I use double or float?

585


How to find type of variable?

626


What are collections in c#?

559


Explain the ways to deploy an assembly?

603


What is type keyword in c#?

606


What is delimiter in c#?

571


Is namespace a class?

575