title: Struct.Pack Equivalent in C#?
body: <p>I'm building a C# client that connects to a render application and failing dismally!
  I narrowed the problem down by dissecting a python client that does work to this line:</p>
  <pre><code>def Startclient_Click(self, sender, e):
       try:
           s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
           s.connect((host, int(port)))
           message =  b'message &quot;Render&quot;'
           msg = struct.pack('&lt;l',len(message))+struct.pack('&lt;l',0)+message
           #print(msg)
           s.sendall(msg)
           data = s.recv(1024)
  
           data.decode(&quot;utf-8&quot;)
           self.datatxt.Text =&quot;data: &quot; +str(data)
           s.close()
  
           return
       except:
           self.datatxt.Text =&quot;No Server Connection&quot;
           return
  </code></pre>
  <p>What would the equivalent be in C#?
  From my understanding it needs 8 bytes before the message.</p>