ProtocolField Constructor ()
Initializes a new instance of the ProtocolField class.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub New
public ProtocolField ()
public:
ProtocolField ()
public ProtocolField ()
public function ProtocolField ()
Remarks
Updated text:5 December 2005
Updated sample code:5 December 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.
Example
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)
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
ProtocolField Class
ProtocolField Members
Microsoft.SqlServer.Management.Nmo Namespace