Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Do loops in c#?

837


What is the difference between proc. Sent by val and by sub?

911


what is method overloading in c#?

994


How long can a string be c#?

846


What is serialization in unity?

855


What is the difference between ref and out in c#?

848


What is equal c#?

869


What is an escape sequence in c#?

923


What is xml serialization and deserialization in c#?

908


Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?

912


Can mvc be used for desktop applications?

902


Difference between a sub and a function in c#.

925


Why do we need a singleton class?

929


What is the purpose of abstract class in c#?

867


What is executescalar in c#?

795