I want to pass a string password in System.Diagnostics.Process.Start.
The problem is that the defined password parameter is SecureString not
string while my password is string.
Normal casting evaluates to errors.
Please how to cast string to SecureString?
Many Thanks in Advance.
Bishoy
Bishoy George - 23 Aug 2006 23:30 GMT
> I want to pass a string password in System.Diagnostics.Process.Start.
>
[quoted text clipped - 8 lines]
>
> Bishoy
-------------------------------------
I found a simple way:
char[] passwordChars = passwordPre.ToCharArray();
SecureString password = new SecureString();
foreach (char c in passwordChars)
{
password.AppendChar(c);
}