Поделиться через


SubscriptionField Constructor ()

Initializes a new instance of the SubscriptionField class.

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

Синтаксис

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

Замечания

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

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

When using the default constructor, first set the Name, then the Parent and then other properties, such as the required Type property, to avoid run-time exceptions.

Пример

The following examples show how to use this default constructor to create a subscription field and then add it to a subscription class:

// Create a subscription field and set required properties.
SubscriptionField subDevice = new SubscriptionField();
subDevice.Name = "DeviceName";
subDevice.Parent = flightSubscriptions;
subDevice.Type = "nvarchar(255)";
subDevice.TypeModifier = "";
flightSubscriptions.SubscriptionFields.Add(subDevice);
' Create a subscription field and set required properties.
Dim subDevice As SubscriptionField = New SubscriptionField()
subDevice.Name = "DeviceName"
subDevice.Parent = flightSubscriptions
subDevice.Type = "nvarchar(255)"
subDevice.TypeModifier = ""
flightSubscriptions.SubscriptionFields.Add(subDevice)

Платформы

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

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

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

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

См. также

Справочник

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