Protect string content by marshalling
IntPtr bstr = Marshal.SecureStringToBSTR(password); try { // ... // use the bstr // ... } finally { Marshal.ZeroFreeBSTR(bstr); }
11305 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
IntPtr bstr = Marshal.SecureStringToBSTR(password); try { // ... // use the bstr // ... } finally { Marshal.ZeroFreeBSTR(bstr); }