Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadnaser/216c25b10a6d691c57dd to your computer and use it in GitHub Desktop.
Save ahmadnaser/216c25b10a6d691c57dd to your computer and use it in GitHub Desktop.
get the char as an output of two array of bytes summation
//convert string to array of chars
string text = "abcd";
char[] array2 = text.ToCharArray();
//1-convert char to array of bytes
//2-sumation of two array of bytes
//3-return the value of the two arays as array of chars
//4-get the char as an output of two array of bytes summation
//For More Information visit: http://www.ssec.wisc.edu/~tomw/java/unicode.html#x0600
byte[] utf1= Encoding.Unicode.GetBytes("ﺬ");
byte[] utf2 = Encoding.Unicode.GetBytes("\u0001");
var result = Encoding.Unicode.GetChars(SumArray(utf1, utf2));
MessageBox.Show(result[0] + "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment