SecureString Constructor ()

 

Initializes a new instance of the SecureString class.

Namespace:   System.Security
Assembly:  mscorlib (in mscorlib.dll)

new : unit -> SecureString

Exception Condition
CryptographicException

An error occurred while protecting or unprotecting the value of this instance.

NotSupportedException

This operation is not supported on this platform.

Win2kFamily

SecureString is only supported on Windows 2000 Service Pack 3 and later.

The following example uses the default (or parameterless) constructor to instantiate a new SecureString object. It then calls the AppendChar method to add an array of characters to it.

No code example is currently available or this language may not be supported.

The following example creates a SecureString object from the value of a String object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: