CSharp examples for System:String Base
Encodes bytes to a base16 string.
using System.Security.Cryptography; using System;/*from w w w.j a v a2s. co m*/ public class Main{ /// <summary> /// Encodes bytes to a base16 string. /// </summary> public static String Encode(Byte[] bytes) { String hex = ""; for (Int32 i = 0; i < bytes.Length; i++) { hex += bytes[i].ToString("x2"); } return hex; } }