I need to convert some legacy C ++ code to C #, and I was wondering what is the C # equivalent for the MAKEWORD C ++ Windows macro?
MAKEWORD
public static uint MakeWord(byte low, byte high) { return ((uint)high << 8) | low; }
However, you may need the result as an int , depending on what you are doing with it (bring it if necessary).
int