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.
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.
You can use Environment.SetEnvironmentVariable
to create, modify or delete environment variable and
Environment.GetEnvironmentVariable
for retrieve it.
Reference: https://docs.microsoft.com/en-us/dotnet/api/system.environment.setenvironmentvariable?view=netframework-4.7.2 To delete you set it to null.