如何获得和在C#中设置环境变量?如何获得、环境变量

2023-09-02 21:08:00 作者:十里春风不如她

我怎样才能获得Environnment变量,如果有任何缺失,设置的值?

How can I get Environnment variables and if something is missing, set the value?

推荐答案

使用System.Environment类。

Use the System.Environment class.

该方法的 System.Environment.GetEnvironmentVariable()

System.Environment.SetEnvironmentVariable()

将做的工作给你。