I would like to get the current user for use in an app.config file. I can't just use Environment.UserName
like I can in the VB file. Essentially I'm trying to have the app email whichever user is logged in rather than hard-coding a specific user.
Something that would work like this...
<add key="EmailFrom" value=Environment.UserName />
Note: the "Environment.UserName" is the correct effect I would like to get.