Microsoft.Data.SqlClient.SqlCredential
SqlCredential provides a more secure way to specify the password for a login attempt using SQL Server Authentication. SqlCredential is comprised of a user id and a password that will be used for SQL Server Authentication. The password in a SqlCredential object is of type SecureString. SqlCredential cannot be inherited. Windows Authentication (Integrated Security = true) remains the most secure way to log in to a SQL Server database.
namespace Microsoft.Data.SqlClient
{
public sealed class SqlCredential
{
public SecureString Password { get; }
public string UserId { get; }
public SqlCredential(string userId, SecureString password);
}
}