I saw this thread :
When would I need a SecureString in .NET?
the code there is :
SecureString password = new SecureString("password");
vs
SecureString pass = new SecureString();
foreach (char c in "password".ToCharArray())
pass.AppendChar(c);
And I do understand the benefits of the second one ( adding char by char) - so that the hacker will not be able to track all chars which in random places in memory ( vs one string in mem which he can find).
The Part which I dont understnad is that part :
that yellow code is deferentially in memory !
so ... where is the benefit ?