ToBase16()

Posted on January 9, 2008 14:44 by Mamanze

Useful snippet, converts a byte array to base 16:

 

public static class Extensions {
	public static string ToBase16(this byte[] input) {
		return string.Concat((from x in input
				    select x.ToString("x2")).ToArray());
	}
}

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

August 28. 2008 14:01