ProtocolField Constructor ()

Initializes a new instance of the ProtocolField class.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
Public Sub New
public ProtocolField ()
public:
ProtocolField ()
public ProtocolField ()
public function ProtocolField ()

Замечания

Изменения текста5 декабря 2005 г.

Изменения образцов кода5 декабря 2005 г.

If you use the default constructor, you must immediately set the Name property and then set the Parent property. You can then set other properties.

Пример

The following examples show how to use this default constructor to create a protocol field and then add it to a collection of protocol fields:

// Define a protocol field and set properties.
ProtocolField fileProtocolField1 = new ProtocolField();
fileProtocolField1.Name = "LeavingFrom";
fileProtocolField1.Parent = fileProtocol;
fileProtocolField1.FieldReference = "LeavingFrom";
fileProtocol.ProtocolFields.Add(fileProtocolField1);
' Define a protocol field and set properties.
Dim fileProtocolField1 As ProtocolField = New ProtocolField()
fileProtocolField1.Name = "LeavingFrom"
fileProtocolField1.Parent = fileProtocol
fileProtocolField1.FieldReference = "LeavingFrom"
fileProtocol.ProtocolFields.Add(fileProtocolField1)

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

ProtocolField Class
ProtocolField Members
Microsoft.SqlServer.Management.Nmo Namespace