title: Forced Casting in vb.net
body: <p>I have tried to find a function/operator for vb.net that does the same as the following in c:
  uint8_t value1 = 200;
  int8_t value2 = (int8_t)value1;</p>
  
  <p>-> value2 should be some negative value</p>
  
  <p>since there are bitwise or, xor, and, not, i'd hope there is also a clean way to do a cast based on the binary, not the decimal value.</p>
  
  <p>I'd need this for 8, 16 &amp; 32 bit integers and in both directions.</p>
  
  <p>If u are asking yourself why, i am developing a custom communication library for a microcontroller and the data sent is allways unsigned bytes and after masking, parity checking and arranging the data, i end up with unsigned integer values that need to be cast back to their original type.</p>
  
  <p>Now i know, that i could implement this by substracting some value if the input value gets bigger than 127... but that is just messy and slow, so i was hoping there is somewhere a function that just tells the compiler to do a direct cast without checking if it makes sense.</p>
  
  <p>I'd really appreciate your input.</p>