But it turns out, they are available through the static class System.Environment, e.g:
var variableValue = Environment.GetEnvironmentVariable("nameOfVariable");
....
edit: wow just realised it's been almost two years since my last post.... time to bring this thing back to life :)
edit: wow just realised it's been almost two years since my last post.... time to bring this thing back to life :)
Thank you for sharing this. Saved me heaps of time.
ReplyDeleteThanks, great time saver.
ReplyDeleteNice one. The advantage of taking them from context is that you can mock the values for unit tests. It's not ideal to have any class tied to another static class.
ReplyDeleteNICE!!!!!!!!!! Saved me. Regards HueHue
ReplyDeleteThe article was very clear AWS Online Training Bangalore
ReplyDeleteI have read this post. collection of post is a nice one AWS Online Training Bangalore
ReplyDeleteThis concept is a good way to enhance the knowledge.thanks for sharing. please keep it up
ReplyDeletesalesforce Online course Bangalore
It's a nice post I was really impressed by reading this Dot NET Online Course Hyderabad
ReplyDeleteEnjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles.
ReplyDeleteDigital Marketing Training in Chennai
Digital Marketing Course in Chennai