How can i get the Client Computer name
问题 I am using C# Framework 4.0 Windows Form. My program is installed on a server TSE. There are 11 light clients that connect to this server. When one of these clients launches my progam, how can I get his PC name ? 回答1: Assuming you are using Terminal Services and Remote Desktop, you can check the CLIENTNAME environment variable to retrieve the client machine's name, although some people report problems with it. You can get the value with Environment.GetEnvironmentVariable, eg var clientName