What is the equivalent of C # MAKEWORD C ++ Windows Macro?

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?

+4
source share
1 answer
 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).

+4
source

All Articles