Share via


ThrowIfPropertyNotSet メソッド (String, String)

指定された接続プロパティが NULL または空の場合に例外をスローします。

名前空間:  Microsoft.SqlServer.Management.Common
アセンブリ:  Microsoft.SqlServer.ConnectionInfo (Microsoft.SqlServer.ConnectionInfo.dll)

構文

'宣言
Protected Function ThrowIfPropertyNotSet ( _
    propertyName As String, _
    str As String _
) As String
'使用
Dim propertyName As String
Dim str As String
Dim returnValue As String

returnValue = Me.ThrowIfPropertyNotSet(propertyName, _
    str)
protected string ThrowIfPropertyNotSet(
    string propertyName,
    string str
)
protected:
String^ ThrowIfPropertyNotSet(
    String^ propertyName, 
    String^ str
)
member ThrowIfPropertyNotSet : 
        propertyName:string * 
        str:string -> string 
protected function ThrowIfPropertyNotSet(
    propertyName : String, 
    str : String
) : String

パラメーター

  • propertyName
    型: System. . :: . .String
    "Login" など、接続プロパティの名前を示す文字列です。

戻り値

型: System. . :: . .String
文字列が NULL または空の場合、このメソッドは PropertyNotSetException をスローします。それ以外の場合は、str パラメーターの値を返します。