How to convert a Securestring to String using C# and VB.NET

Here is an example on how to convert a Securestring to String using C# and VB.NET.
Please remember that storing the data in a plain string will be beat the whole point of using SecureString. This method should only be used for testing purposes.
This Extension Method is now part of the Fesslersoft.Extensions.

Samples

C# Sample

VB.NET Sample

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

How to convert a String to Securestring using C# and VB.NET

Here is an example on how to convert a String to Securestring using C# and VB.NET.
Please remember that the plain string which will be converted to SecureString beats the whole point of using SecureString. This method should only be used for testing purposes.
This Extension Method is now part of the Fesslersoft.Extensions.

Samples

C# Sample

VB.NET Sample

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

How to get the total ram of system in C# and VB.NET

To get the total ram of system in C# and VB.NET you can use the following snippet.

Sample C#

Console.WriteLine("Total RAM (bytes) in System: {0}", new Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory);

Sample VB.NET

Console.WriteLine("Total RAM (bytes) in System: {0}", New Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory)

Please rate this snippet