Reputation: 1031
I am new to Bloomberg API, trying to develop my first C# application.
I have installed the blp API. I have with Visual Studio 2008 added a reference to blpapicomLib COM object.
I have defined and alias like this:
using SessionOptions = blpapicomLib.SessionOptions;
When I try to create a new SessionOptions like this:
SessionOptions sessionOptions = new SessionOptions();
I receive the error:
Error 1 Cannot create an instance of the abstract class or interface 'blpapicomLib.SessionOptions' C:\AMSFeederTest\VarPricesLib\VarPricesLib\VarPrices.cs 23 45 VarPricesLib
What library reference should I add to my project ?
Upvotes: 0
Views: 2311
Reputation: 966
using Session = Bloomberglp.Blpapi.Session;
using SessionOptions = Bloomberglp.Blpapi.SessionOptions;
SessionOptions sessionOptions = new SessionOptions();
sessionOptions.ServerHost = serverHost; //localhost
sessionOptions.ServerPort = serverPort; //8194
Session session = new Session(sessionOptions);
...
...
Upvotes: 1