Aracılığıyla paylaş


ConnectionSettings.ThrowIfPropertyNotSet Yöntemi (String, String)

Belirtilen bağlantı özellik null veya boş ise, bir istisna atar.

Ad Alanı:  Microsoft.SqlServer.Management.Common
Derleme:  Microsoft.SqlServer.ConnectionInfo (Microsoft.SqlServer.ConnectionInfo içinde.dll)

Sözdizimi

'Bildirim
Protected Function ThrowIfPropertyNotSet ( _
    propertyName As String, _
    str As String _
) As String
'Kullanım
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

Parametreler

  • propertyName
    Tür: System.String
    Bağlantının adını belirten bir dize özellik, "Login" gibi.

Dönüş Değeri

Tür: System.String
Dize null veya boş ise, bu yöntem atar bir PropertyNotSetException.Aksi takdirde bu yöntem döndürür str parametre değeri.