I want to create a environment variables using C# and VB.Net code and able to Read,Delete and Set values to the new created variable. help me with code to do this process.
Asked
Active
Viewed 9,563 times
1 Answers
10
You can use Environment.SetEnvironmentVariable
to create, modify or delete environment variable and
Environment.GetEnvironmentVariable
for retrieve it.
Reference: https://learn.microsoft.com/en-us/dotnet/api/system.environment.setenvironmentvariable?view=netframework-4.7.2 To delete you set it to null.

GordoRamsay
- 3
- 2

Grzesiek Danowski
- 437
- 3
- 10