不需要.使用SecureString对象的全部原因是为了避免创建string对象(它被加载到内存中,并以明文形式保存在内存中,直到垃圾回收).但是,可以通过追加字符来向SecureString添加字符.
var s = new SecureString();
s.AppendChar('d');
s.AppendChar('u');
s.AppendChar('m');
s.AppendChar('b');
s.AppendChar('p');
s.AppendChar('a');
s.AppendChar('s');
s.AppendChar('s');
s.AppendChar('w');
s.AppendChar('d');