Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
Web Hosting

Bonsai Boy of New York Bonsai Trees and Accessories

BlueHost Web Hosting

Liquid Web iThemes WordPress Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

DreamHost Web Hosting


getResponse autofunnels

Liquid Web Cloud VPS Hosting

11,144 questions

15,208 answers

573 users

How to convert a byte array to a hexadecimal string in C#

2 Answers

0 votes
using System;

class Program
{
    static void Main() {
        byte[] bArray = { 1, 2, 4, 8, 16, 32, 64, 128 };
        string s = BitConverter.ToString(bArray);
        
        Console.Write(s);
    }
}


/*
run:

01-02-04-08-10-20-40-80

*/

 




answered Sep 10 by avibootz
0 votes
using System;
 
class Program
{
    static void Main() {
        byte[] bArray = { 1, 2, 4, 8, 16, 32, 64, 128 };
        string s = BitConverter.ToString(bArray).Replace("-", string.Empty);
         
        Console.Write(s);
    }
}
 
 
/*
run:
 
0102040810204080
 
*/

 




answered Sep 11 by avibootz
...