title: How to call Static method in powershell
body: <p>I have third party DLL(written in c#)</p>
  
  <p>That has a class called <code>DBConnection</code> and static method called <code>Connect</code>
  When I call that method from my C# console application like below it will work fine.</p>
  
  <pre><code>DataPackage.Db.DBConnection.Connect()
  </code></pre>
  
  <p>Next I tried to do the same thing using powershell.</p>
  
  <pre><code>[DataPackage.Db.DBConnection]::Connect()
  </code></pre>
  
  <p>But that gives me error  </p>
  
  <pre><code>Exception calling "Connect" with "0" argument(s): "Object reference not set to an instance of an object."
  </code></pre>
  
  <p>What is the reason for this and how to fix this??</p>