ConnectionSettings.ThrowIfPropertyNotSet Yöntemi (String, String, Boolean)
Belirtilen bağlantı özellik null veya boş isteğe bağlı olarak, 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, _
checkEmpty As Boolean _
) As String
'Kullanım
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
Parametreler
- propertyName
Tür: System.String
Bağlantının adını belirten bir dize özellik, "Login" gibi.
- str
Tür: System.String
A String nesne içeren özellik değeri.
- checkEmpty
Tür: System.Boolean
Doğru özellik değeri boş bir dize veya null değeri; denetlemek istiyorsanız yanlış için null bir değer denetlemek isterseniz.
Dönüş Değeri
Tür: System.String
özellik ise küme, bu yöntem atar bir PropertyNotSetException.Aksi takdirde bu yöntem döndürür str parametre değeri.
Açıklamalar
Özellik değeri boş bir dize ise, istisna, isterseniz, küme checkEmpty parametresi için true.