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

Why are dynamic link library used over static one?

967


What is difference between an Structure and Class?

1105


How does return work in c#?

969


Is c# code is managed or unmanaged code?

1022


What is the use of xmlserializer?

862


What's the c# syntax to catch any possible exception?

1044


What is the difference between method parameters and method arguments. Give an example?

923


What are types in c#?

913


How big is a 64 bit integer?

886


What is the difference between paramaterized constructor and copy constructor?

898


What is a constructor in c#?

1391


Will the following code compile and run?

978


In c#, what will happen if you do not explicitly provide a constructor for a class?

953


Write a program in c# to find the angle between the hours and minutes in a clock?

908


What are fields in c#?

880