Share via


Computer Constructors

Definition

Initializes a new instance of the Computer class.

Overloads

Computer()

Initializes a new instance of the Computer class.

Computer(Utility, String)

Initializes a new instance of the Computer class with the specified parent Utility object and the specified name.

Computer()

Initializes a new instance of the Computer class.

public:
 Computer();
public Computer ();
Public Sub New ()

Examples

VC#

Computer computer;  
computer = new Computer();  

VB

Dim computer As Computer  
computer = New Computer()  

PowerShell

$computer = New-Object Microsoft.SqlServer.Management.Utility.Computer()  

Remarks

The default constructor initializes any fields to their default values.

Applies to

Computer(Utility, String)

Initializes a new instance of the Computer class with the specified parent Utility object and the specified name.

public:
 Computer(Microsoft::SqlServer::Management::Utility::Utility ^ parent, System::String ^ name);
public Computer (Microsoft.SqlServer.Management.Utility.Utility parent, string name);
new Microsoft.SqlServer.Management.Utility.Computer : Microsoft.SqlServer.Management.Utility.Utility * string -> Microsoft.SqlServer.Management.Utility.Computer
Public Sub New (parent As Utility, name As String)

Parameters

parent
Utility

A Utility object value that is the parent of the Computer object.

name
String

A String value that specifies the name of the computer.

Examples

VC#

Computer computer;  
computer = new Computer(Utility,"HR_Com45");  

VB

Dim computer As Computer  
computer = New Computer(Utility,"HR_Com45")  

PowerShell

$computer = New-Object Microsoft.SqlServer.Management.Utility.Computer(Utility,"HR_Com45")  

Remarks

Provide the name of the parent Utility object and the name of the computer.

Applies to