Secure String initialization

Hi,
I have a secure string in my process.
I want to initialize it to some dummy value “1234” in case it gets empty value.
How can I do that?

Thank you so much,

Hi @A_Learner

New System.Net.Networkcredentials(“”,“1234”).Securepassword

Hope it helps!!

Hi @A_Learner

Check if the SecureString is empty.
If empty, initialize it to the dummy value “1234”

Regards,

1 Like