다음을 통해 공유


ConnectionSettings.ThrowIfPropertyNotSet 메서드 (String, String, Boolean)

지정한 연결 속성이 Null이거나 선택적으로 비어 있으면 예외를 발생시킵니다.

네임스페이스:  Microsoft.SqlServer.Management.Common
어셈블리:  Microsoft.SqlServer.ConnectionInfo(Microsoft.SqlServer.ConnectionInfo.dll)

구문

‘선언
Protected Function ThrowIfPropertyNotSet ( _
    propertyName As String, _
    str As String, _
    checkEmpty As Boolean _
) As String
‘사용 방법
Dim propertyName As String 
Dim str As String 
Dim checkEmpty As Boolean 
Dim returnValue As String 

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

매개 변수

  • propertyName
    유형: String
    연결 속성의 이름(예: "Login")을 지정하는 문자열입니다.
  • str
    유형: String
    속성 값을 포함하는 String 개체입니다.
  • checkEmpty
    유형: Boolean
    빈 문자열이나 Null 값의 속성 값을 확인하려면 true이고, Null 값에 대해서만 확인하려면 false입니다.

반환 값

유형: String
속성이 설정되어 있지 않은 경우 이 메서드는 PropertyNotSetException을 발생시킵니다.그렇지 않으면 이 메서드는 str 매개 변수 값을 반환합니다.

주의

속성값은 빈문자열집합하는 경우 예외를 throw 하려는 경우는 checkEmpty매개 변수를 true로.

참고 항목

참조

ConnectionSettings 클래스

ThrowIfPropertyNotSet 오버로드

Microsoft.SqlServer.Management.Common 네임스페이스