Answers for "string number to hex c#"

C#
2

hex string to int c#

string hex = "142CBD";
// this returns 1322173
int intValue = int.Parse(hex, System.Globalization.NumberStyles.HexNumber);
Posted by: Guest on August-19-2020
0

c# string to hex

byte[] ba = Encoding.Default.GetBytes("sample");
var hexString = BitConverter.ToString(ba);
hexString = hexString.Replace("-", "");
Posted by: Guest on January-03-2022

C# Answers by Framework

Browse Popular Code Answers by Language