ServerComputer.Name Property

 

Gets the computer name.

Namespace:   Microsoft.VisualBasic.Devices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public string Name { get; }

Property Value

Type: System.String

A String containing the name of the computer.

The My.Computer.Name property provides functionality similar to the MachineName property.

Project type

Available

Windows Forms Application

Yes

Class Library

Yes

Console Application

Yes

Windows Forms Control Library

Yes

Web Control Library

Yes

Windows Service

Yes

Web Site

Yes

This example uses the My.Computer.Name property to display the name of the computer on which the code runs.

MsgBox("Computer name: " & My.Computer.Name)

.NET Framework
Available since 2.0
Return to top
Show: