In a C# 2008 application, I have code like what is listed below.
Thread.CurrentPrincipal.IsInRole(Environment.UserDomainName + "\\" + "Role")
I want to change the code so the "role" value is obtained from the app.config file instead of having a hard-coded value of "role".
Thus can you show me some code how I can obtain the "Role" value from the app.config file instead of using hard-coded values?
C# various values in app.config
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Nov 6, 2012, 6:38 AM EST
scampercat187 reputationPosted Nov 6, 2012, 7:13 AM EST