Mega Code Archive

 
Categories / C# / Data Types
 

Get Unsigned Byte Value

using System; using System.Collections.Generic; using System.Text; public static class Utility {     public static Byte GetUnsignedByteValue(Byte b)     {         byte v = (byte)(b & 127);         if (b >> 7 != 0)         {             v += 128;         }         return v;     } }