标签:blog code tar ext int string art http com for new
public static string ToHexString ( byte[] bytes ) // 0xae00cf => "AE00CF "
{
string hexString = string.Empty;
if ( bytes != null )
{
StringBuilder strB = new StringBuilder ();
for ( int i = 0; i < bytes.Length; i++ )
{
strB.Append ( bytes[i].ToString ( "X2" ) );
}
hexString = strB.ToString ();
}
return hexString;
}
byte[] bytes和string转换,码迷,mamicode.com
标签:blog code tar ext int string art http com for new
原文地址:http://www.cnblogs.com/gisoracle/p/3702856.html