Answers for "how to convert hexadecimal string to byte array in c#"

C#
23

c# string to byte array

string author = "Mahesh Chand";  
// Convert a C# string to a byte array  
byte[] bytes = Encoding.ASCII.GetBytes(author);  

// Convert a byte array to a C# string. 
string str = Encoding.ASCII.GetString(bytes);
Posted by: Guest on April-17-2020
3

byte array to hex c#

public static string ByteArrayToString(byte[] ba)
{
  return BitConverter.ToString(ba).Replace("-","");
}
Posted by: Guest on December-16-2020

Code answers related to "how to convert hexadecimal string to byte array in c#"

C# Answers by Framework

Browse Popular Code Answers by Language