CSharpTest.Net
ToCharArray Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Crypto Namespace > SecureStringUtils Class : ToCharArray Method

data

Glossary Item Box

Returns the secure string as an array of characters

Syntax

Visual Basic (Declaration) 
Public Shared Function ToCharArray( _
   ByVal data As SecureString _
) As Char()
C# 
public static char[] ToCharArray( 
   SecureString data
)

Parameters

data

Example

Library/Library.Test/TestSecureString.cs

C#Copy Code
foreach (SecureString ss in MakeStrings())
{
    Assert.AreEqual(TEST_PASSWORD, new String(SecureStringUtils.ToCharArray(ss)));
}
VB.NETCopy Code
For Each ss As SecureString In MakeStrings()
    Assert.AreEqual(TEST_PASSWORD, New [String](SecureStringUtils.ToCharArray(ss)))
Next

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys