title: How to determine if a string is a valid IPv4 or IPv6 address in C#?
body: <p>I know regex is <a href="http://www.perlmonks.org/index.pl?node_id=221512" rel="noreferrer">dangerous</a> for validating IP addresses because of the different forms an IP address can take.</p>
  
  <p>I've seen similar questions for C and C++, and those were resolved with a function that doesn't exist in C# <a href="http://beej.us/guide/bgnet/output/html/multipage/inet_ntopman.html" rel="noreferrer">inet_ntop()</a></p>
  
  <p>The .NET solutions I've found only handle the standard "ddd.ddd.ddd.ddd" form. Any suggestions?</p>