开发者

application is now running on server or client

开发者 https://www.devze.com 2023-01-24 05:22 出处:网络
I use VB.NET for a Windows application. How can I find out if the开发者_Go百科 application is now running on a server or client (programmatically)?

I use VB.NET for a Windows application.

How can I find out if the开发者_Go百科 application is now running on a server or client (programmatically)?

Thanks.


This is a little ambiguous since any machine can be a server or a client. One way you could check is by inspecting the Environment.MachineName variable:

If  Environment.MachineName = "MyServerName" Then
  ''Do something here.
End If

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

0

精彩评论

暂无评论...
验证码 换一张
取 消