title: How to change Primary DNS Suffix of a computer in .NET?
body: <p>I'm working on an auto-configure app for new PC's. I managed to programatically set all the needed parameters, except Primary DNS Suffix of a computer (please remember that this is different from the network connection default DNS suffix).</p>
  
  <p>Any help?</p>
  
  <p>Update: Here's requested class for setting IP, Subnet, Gateway, and DNS of the PC.
  <a href="http://pastebin.com/fHACwwDV" rel="nofollow">http://pastebin.com/fHACwwDV</a></p>
  
  <p>It was tested only in system having 1 network interface, I don't know how it'll behave when there are more NICs. Oh, and it's WIP, so for now no error handling apart from throwing exception was implemented. </p>