TizzyT

ByteArrayToAscii -TizzyT

Jan 31st, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1.         public static string ByteArrayToAscii(byte[] ByteArray, int index, int length, bool clean)
  2.         {
  3.             string R = "";
  4.             byte[] temp = new byte[length];
  5.             Array.Copy(ByteArray, index, temp, 0, temp.Length);
  6.             R = Encoding.ASCII.GetString(temp);
  7.             if (clean) return R.Replace("\0", "");
  8.             return R;
  9.         }
Advertisement
Add Comment
Please, Sign In to add comment