title: .Net TCP/IP send character with Ctrl Key modifier
body: <p>I am interfacing with a piece of hardware via a TCP/IP socket, however the documentation is limited.</p>
  
  <p>At present I can get the response I am after by sending Ctrl+G in Putty which prints as '^G'</p>
  
  <p>How can i replicate this in code? I can send 'G' but I'm not sure how to modify it with 'Ctrl' </p>
  
  <pre><code>Dim buffer = Text.ASCIIEncoding.ASCII.GetBytes(cmd &amp; vbNewLine)
  ns.Write(buffer, 0, buffer.Length) 'ns = Network Stream
  ns.Flush()
  </code></pre>
  
  <p>I am working in VB.Net however examples in C# are fine.</p>