次の方法で共有


TimeZoneEnumeration Constructor ()

TimeZoneEnumeration クラスの初期化されていないインスタンスを作成します。

名前空間: Microsoft.SqlServer.NotificationServices
アセンブリ: Microsoft.SqlServer.NotificationServices (microsoft.sqlserver.notificationservices.dll 内)

構文

'宣言
Public Sub New
public TimeZoneEnumeration ()
public:
TimeZoneEnumeration ()
public TimeZoneEnumeration ()
public function TimeZoneEnumeration ()

解説

パラメータなしのコンストラクタは、COM 相互運用機能を有効にするために、Initialize メソッドと共に使用します。オブジェクトを作成した後は、使用する前に必ず、NSInstance への参照とタイム ゾーンのデータで使用する言語を表す文字列を使用して初期化してください。

使用例

Microsoft Visual Basic Scripting Edition (VBScript) のアンマネージ コードで、TimeZoneEnumeration を作成して初期化する例を次に示します。

Dim testInstance, testTimeZoneEnumeration, timeZones
const instanceName = "Tutorial"

' Create the NSInstance object.
set testInstance = WScript.CreateObject( _ 
    "Microsoft.SqlServer.NotificationServices.NSInstance")
testInstance.Initialize instanceName

' Create the TimeZoneEnumeration object.
set testTimeZoneEnumeration = WScript.CreateObject( _ 
    "Microsoft.SqlServer.NotificationServices.timeZoneEnumeration")
testTimeZoneEnumeration.Initialize (testInstance), "en" 

' Print the valid time zone IDs between 2 and 40
for each thisTimeZone in testTimeZoneEnumeration
    if thisTimeZone.TimeZoneId >=2 _
        and thisTimeZone.TimeZoneId <=40 then
        timeZones = timeZones & thisTimeZone.TimeZoneId & ", "
    end if
next
WScript.echo timeZones

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

TimeZoneEnumeration Class
TimeZoneEnumeration Members
Microsoft.SqlServer.NotificationServices Namespace