Link to home
Start Free TrialLog in
Avatar of JMO9966
JMO9966

asked on

How to creata an instance of an Interface in VB.Net

I'm migrating a project from C# to VB.Net and need to mimic this successful C# code in VB.net.

These two lines of code runs successfully in the C# project. ISchedulerFactory and IScheduler are both Interfaces:

            // First we must get a reference to a scheduler
            ISchedulerFactory sf = new StdSchedulerFactory();
            IScheduler sched = sf.GetScheduler();


Thanks
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

this is VB 101!

            '// First we must get a reference to a scheduler
            dim sf as new StdSchedulerFactory()
            dim sched as IScheduler = sf.GetScheduler()
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JMO9966
JMO9966

ASKER

That's the syntax I was using, thanks.

I discovered my issue was missing assemblies.