Byte Array To Hex String with LINQ - CSharp System

CSharp examples for System:Byte Array

Description

Byte Array To Hex String with LINQ

Demo Code


using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*from  w w w.  jav a 2s .c  om*/

public class Main{
        public static string ToHexString(this byte[] data)
        {
            return data.Select(m => m.ToString("X2")).Join("");
        }
}

Related Tutorials