Compartilhar via


NotificationField Constructor ()

Initializes a new instance of the NotificationField class.

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

Syntax

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

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 Type and DigestGrouping properties.

Example

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

// Create a notification field and set properties.
NotificationField notificationOrgin = new NotificationField();
notificationOrgin.Name = "LeavingFrom";
notificationOrgin.Parent = flightNotifications;
notificationOrgin.Type = "nvarchar(6)";
notificationOrgin.DigestGrouping = false;
flightNotifications.NotificationFields.Add(notificationOrgin);
' Create a notification field and set properties.
Dim notificationOrgin As NotificationField = New NotificationField()
notificationOrgin.Name = "LeavingFrom"
notificationOrgin.Parent = flightNotifications
notificationOrgin.Type = "nvarchar(6)"
notificationOrgin.DigestGrouping = False
flightNotifications.NotificationFields.Add(notificationOrgin)

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

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