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