Returns a System.Security.SecureString from the password
Syntax
Visual Basic (Declaration) | |
---|
Public Function ToSecureString() As SecureString |
Example
Library/Library.Test/TestPassword.cs
C# | Copy Code |
---|
using (Password p1 = new Password(TEST_PASSWORD))
using (SecureString sstr = p1.ToSecureString())
using (Password p2 = new Password(sstr))
{
Assert.AreEqual(p1, p2);
} |
VB.NET | Copy Code |
---|
Using p1 As New Password(TEST_PASSWORD)
Using sstr As SecureString = p1.ToSecureString()
Using p2 As New Password(sstr)
Assert.AreEqual(p1, p2)
End Using
End Using
End Using |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also