using System; using System.Security; public class Example { unsafe public static void Main() { SecureString testString; char[] chars = { 't', 'e', 's', 't' }; fixed(char* pChars = chars) { testString = new SecureString(pChars, chars.Length); } Console.WriteLine(testString.Length); } }