title: VB.NET SerialPort send strings and bytes
body: <p>I'm stuck at the moment because it seems like I'm really mixing up things and I am not able to test it because there are so many conversions and I'm not sure what happens where. I'm sure you can resolve that :) </p>
  
  <p>I need to send strings and bytes over serial.</p>
  
  <p>Sending a string is easy: SerialPort.Write(text)</p>
  
  <p>But I also need to send bytes. How do I send the byte-value 50 to the SerialPort? NOT the integer 50 converted to byte! How do I go about this exactly?</p>
  
  <p>SerialPort.Write(50, 0, 1) says 50 is an integer. How do I make this a byte?</p>
  
  <p>Here's the reference: <a href="https://msdn.microsoft.com/en-us/library/ms143551%28v=vs.110%29.aspx?cs-save-lang=1&amp;cs-lang=vb#code-snippet-1" rel="nofollow">https://msdn.microsoft.com/en-us/library/ms143551%28v=vs.110%29.aspx?cs-save-lang=1&amp;cs-lang=vb#code-snippet-1</a></p>
  
  <p>Cheers and thanks!</p>