Change length of SecureString

  • Thread starter Thread starter Brian Stoop
  • Start date Start date
B

Brian Stoop

I have a SecureString which has a Length of 20. How can I change the length
to 10?


thanks, B.
 
I have a SecureString which has a Length of 20. How can I change the length
to 10?

If by "changing length" here you mean "trim last 10 characters", then
use RemoveAt() method (which, of course, won't work on a string that
was MadeReadOnly()). Otherwise, please explain in more detail what you
want to achieve.
 
Your suggestion worked, its was not ReadOnly,

thanks, B

I have a SecureString which has a Length of 20. How can I change the
length
to 10?

If by "changing length" here you mean "trim last 10 characters", then
use RemoveAt() method (which, of course, won't work on a string that
was MadeReadOnly()). Otherwise, please explain in more detail what you
want to achieve.
 
Back
Top