title: The connection string 'mongodb//localhost' is not valid
body: <p>Followed <a href="https://docs.mongodb.com/manual/reference/connection-string/" rel="nofollow noreferrer">Document</a> on how to connect to local host. <strong>MongodDB Compass</strong> can connect to "localhost:27017", no authentication, no SSL, no SSH Tunnel. In C# project, tried</p>
  
  <pre><code>mongodb//localhost
  mongodb//localhost:27017
  localhost:27017
  </code></pre>
  
  <p>all getting the same </p>
  
  <blockquote>
    <p>MongoDB.Driver.MongoConfigurationException was unhandled<br>
    HResult=-2146233088   Message=The connection string 'all-above' is not
    valid.   Source=MongoDB.Driver.Core   StackTrace:
           at MongoDB.Driver.Core.Configuration.ConnectionString.Parse()
           at MongoDB.Driver.Core.Configuration.ConnectionString..ctor(String
    connectionString)
           at MongoDB.Driver.MongoUrlBuilder.Parse(String url)
           at MongoDB.Driver.MongoUrl..ctor(String url)
           at MongoDB.Driver.MongoClient..ctor(String connectionString)</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>static string con = "mongodb//localhost";
  MongoClient mclient = new MongoClient(con);
  </code></pre>
  
  <p>MongoDB.Driver v2.4.2, MongoDB.Driver.Core v2.4.2</p>
  
  <p>What's wrong?</p>