public byte[] String2Bytes_LSBMSB(string str, byte radix)
{
byte[] numArray;
try
{
if (radix != byte.MaxValue)
{
string[] strArray = str.Split(m_sp_colon);
int length = 0;
for (int index = 0; index < strArray.Length; ++index)
if (strArray[index].Length > 0)
++length;
numArray = new byte[length];
int num = 0;
for (int index = 0; index < strArray.Length; ++index)
try
{
if (strArray[index].Length > 0)
numArray[num++] = Convert.ToByte(strArray[index], (int)radix);
}
catch
{
return null;
}
}
else
{
char[] chArray = str.ToCharArray();
numArray = new byte[chArray.Length];
for (int index = 0; index < chArray.Length; ++index)
numArray[index] = (byte)chArray[index];
}
}
catch
{
return null;
}
return numArray;
}