Share via


SubscriptionClass Constructor ()

Parameterless constructor that creates a new instance of the SubscriptionClass class.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Sub New
public SubscriptionClass ()
public:
SubscriptionClass ()
public SubscriptionClass ()
public function SubscriptionClass ()

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, such as the required FileGroup property.

Example

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

// Create a subscription class and set required properties.
SubscriptionClass flightSubscriptions = new SubscriptionClass();
flightSubscriptions.Name = "FlightSubscriptions";
flightSubscriptions.Parent = myApplication;
flightSubscriptions.FileGroup = "PRIMARY";
' Create a subscription class and set required properties.
Dim flightSubscriptions As SubscriptionClass = New SubscriptionClass()
flightSubscriptions.Name = "FlightSubscriptions"
flightSubscriptions.Parent = myApplication
flightSubscriptions.FileGroup = "PRIMARY"

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

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