decoding qr code by c#

Aug 7 2019 6:16 PM
// The QRDecoder converts byte array to text string the class using this conversion
  1. public static string ByteArrayToStr(byte[] DataArray) {  
  2.  Decoder = Encoding.UTF8.GetDecoder();  
  3.  int CharCount = Decoder.GetCharCount(DataArray, 0, DataArray.Length);  
  4.  char[] CharArray = new char[CharCount];  
  5.  Decoder.GetChars(DataArray, 0, DataArray.Length, CharArray, 0);  
  6.  return new string(CharArray);  
  7. }  
it is converting byte to string ...can anyone tell me how is it working

Answers (5)