SqlCredential(String, SecureString) Konstruktor

Definicja

Tworzy obiekt typu 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)

Parametry

userId
String

Identyfikator użytkownika.

password
SecureString

Hasło; wartość SecureString oznaczona jako tylko do odczytu. Przekazanie parametru odczytu/zapisu SecureString spowoduje podniesienie wartości ArgumentException.

Uwagi

Konstruktor nie akceptuje parametrów null. Dozwolona Empty jest wartość. Próba przekazania parametru null w konstruktorze zgłosi ArgumentNullException wyjątek.

Dotyczy

Zobacz też