So how do you retrieve the customized properties of a .NET application from XML .config file? Can you automate this process ?



So how do you retrieve the customized properties of a .NET application from XML .config file? Can yo..

Answer / 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

More C Sharp Interview Questions

What is unsigned int?

0 Answers  


i have a question which is quite simple but yet complicated for me my question is why do we use void, if it does not return anything to the compiler? if it is used for normal display it can also be done by what is called Console.Write() or Consol.WriteLine() and if i do not use void with my method then my compiler throws me an error. if i return a value say integer then i write public int fun() display of the result can also be done here then why is it so necessary to use void with a function and why so compiler throw us an error if v don't use void return type?

2 Answers  


What is expandoobject in c#?

0 Answers  


What is the advantage of generics in c#?

0 Answers  


Can you use foreach iteration on arrays in c#?

0 Answers  






Does c# have functions?

0 Answers  


Can you put two constructor with the same structure in a class?

0 Answers  


What is the difference between a constant and a static readonly field?

0 Answers  


explain the features of static/shared classes.

0 Answers  


how many catch we can write in thye program?

2 Answers  


Differentiate between response.expires and response.expiresabsolute?

0 Answers  


What is the c# equivalent of c++ catch (...), Which was a catch-all statement for any possible exception?

0 Answers  


Categories