Partager via


ComputerInfo.MachineName Property

Returns the host name. Do not use Environment.MachineName because that truncates at 15 characters (NetBIOS name limit - by design). https://blogs.msdn.com/brada/archive/2005/08/10/449767.aspx

Namespace:  Microsoft.TeamFoundation.Common
Assembly:  Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)

Syntax

'Declaration
Public Shared ReadOnly Property MachineName As String
public static string MachineName { get; }
public:
static property String^ MachineName {
    String^ get ();
}
static member MachineName : string with get
static function get MachineName () : String

Property Value

Type: System.String

.NET Framework Security

See Also

Reference

ComputerInfo Class

Microsoft.TeamFoundation.Common Namespace