Answers for "string to byte"

18

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
6

c# string to byte array

// Convert a string to a C# byte[]
//change encoding depending on your data
string someText = "some data as text.";
byte[] bytes = Encoding.ASCII.GetBytes(author);

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

convert string to byte java

String example = "Convert Java String";
  byte[] bytes = example.getBytes();
Posted by: Guest on April-23-2020
1

String by byte array in java

String str = "Example String";
 byte[] b = str.getBytes();
Posted by: Guest on September-09-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language