SqlCredential(String, SecureString) 建構函式

定義

建立一個型態 SqlCredential為 的物件。

public:
 SqlCredential(System::String ^ userId, System::Security::SecureString ^ password);
public SqlCredential(string userId, System.Security.SecureString password);
new System.Data.SqlClient.SqlCredential : string * System.Security.SecureString -> System.Data.SqlClient.SqlCredential
Public Sub New (userId As String, password As SecureString)

參數

userId
String

用戶標識碼。

password
SecureString

密碼;一個 SecureString 標記為唯讀的值。 傳遞讀寫 SecureString 參數會產生一個 ArgumentException

備註

建構子不接受空參數。 Empty允許值。 嘗試在建構子中傳遞空參數會觸發 ArgumentNullException 例外。

適用於

另請參閱