Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates and initializes an instance of the TimeZoneEnumeration class.
Namespace: Microsoft.SqlServer.NotificationServices
Assembly: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)
Syntax
'Declaration
Public Sub New ( _
nsInstance As NSInstance, _
language As String _
)
public TimeZoneEnumeration (
NSInstance nsInstance,
string language
)
public:
TimeZoneEnumeration (
NSInstance^ nsInstance,
String^ language
)
public TimeZoneEnumeration (
NSInstance nsInstance,
String language
)
public function TimeZoneEnumeration (
nsInstance : NSInstance,
language : String
)
Parameters
- nsInstance
An NSInstance representing the Notification Services instance that contains the collection of time zones.
- language
A String indicating the language in which the time zone data is to be returned.
Example
The following examples show how to create and initialize a TimeZoneEnumeration object in managed code:
Dim instanceName As String = "Tutorial"
' Create the NSInstance object.
Dim testInstance As NSInstance = _
New NSInstance(instanceName)
' Create the TimeZoneEnumeration.
Dim testTimeZoneEnumeration As TimeZoneEnumeration = _
New TimeZoneEnumeration(testInstance, _
System.Globalization.CultureInfo.CurrentUICulture.Parent.Name)
' Step through the enumeration, populating
' the drop-down list as you go. Note that the TimeZone
' reference must include the namespace, because there is
' an identically named class in the System namespace.
Dim thisTimeZone As _
Microsoft.SqlServer.NotificationServices.TimeZone
For Each thisTimeZone In testTimeZoneEnumeration
Console.WriteLine(thisTimeZone.TimeZoneName)
Next
string instanceName = "Tutorial";
// Create the NSInstance object.
NSInstance testInstance = new NSInstance(instanceName);
// Create the TimeZoneEnumeration.
TimeZoneEnumeration testTimeZoneEnumeration =
new TimeZoneEnumeration(testInstance,
System.Globalization.CultureInfo.CurrentUICulture.Parent.Name);
// Step through the enumeration, populating
// the drop-down list as you go. Note that the TimeZone
// reference must include the namespace, because there is
// an identically named class in the System namespace.
foreach(Microsoft.SqlServer.NotificationServices.TimeZone
thisTimeZone in testTimeZoneEnumeration)
{
Console.WriteLine(thisTimeZone.TimeZoneName);
}
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
TimeZoneEnumeration Class
TimeZoneEnumeration Members
Microsoft.SqlServer.NotificationServices Namespace