E
Edwin Knoppert
public static String StringToHex(String sString)
{
if (sString.Length == 0) { return ""; }
StringBuilder sb = new StringBuilder(sString.Length * 2);
Char[] chars = sString.ToCharArray();
String T = "";
foreach (Char c in chars)
{
T = "0" + Convert.ToString(c, 16).ToUpper();
sb.Append(T.Substring (T.Length -2 ));
}
return sb.ToString();
}
{
if (sString.Length == 0) { return ""; }
StringBuilder sb = new StringBuilder(sString.Length * 2);
Char[] chars = sString.ToCharArray();
String T = "";
foreach (Char c in chars)
{
T = "0" + Convert.ToString(c, 16).ToUpper();
sb.Append(T.Substring (T.Length -2 ));
}
return sb.ToString();
}