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

Can we extend sealed class in c#?

702


What is assembly manifest?

751


what is object-oriented programming (oop) language?

684


Why dependency injection is used in c#?

707


Is void a class?

659


What is reflection c#?

662


Write a syntax for writing a event delegate.

709


What is c# most used for?

779


Which constructor is called first in c#?

705


What is the use of xmlserializer?

662


What is the difference between delegates and events in c#?

680


What Is The Difference Between The System.array.copyto() And System.array.clone()?

772


I was trying to use an out int parameter in one of my functions. How should I declare the variable that I am passing to it?

769


What is the syntax for calling an overloaded constructor within a constructor?

771


What is default constructor in c#?

696