How do I get the local machine name in C#?

后端 未结 5 868
梦谈多话
梦谈多话 2020-11-27 18:27

How do I get the local machine name?

5条回答
  •  失恋的感觉
    2020-11-27 19:18

    You should be able to use System.Environment.MachineName for this. It is a property that returns a string containing the netBIOS name of the computer:

    http://msdn.microsoft.com/en-us/library/system.environment.machinename.aspx

提交回复
热议问题