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

How to declare a property in a class?

758


What does static mean in c sharp?

805


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

665


What is the console on a mac?

688


How assembly versioning in .NET prevent DLL Hell problem?

718


What is a static in c#?

671


What is platform independence"?

736


If I want to override a method one of class A and in class b then how do you declare?

947


Describe the ways of cleaning up objects in c#.

700


Can a struct inherit from another struct or class in c#?

706


What is difference between new and override in c#?

633


Why do canadians say zed?

779


What is continue in c#?

725


hi, is compulsory .net knowledge need for biztalk server training. if need, how far?.tell me some info abt real time instructors in hyd or other?

1297


can you declare an override method to be static if the original method is not static?

772