Women in Technology

Hear us Roar



Article:
  VB.NET OOP Part 3: The Singleton Pattern
Subject:   using singleton inside assembly
Date:   2004-06-25 03:04:44
From:   alexguitar
I put the code of Singleton Class inside
an assembly that i load from a Windows.Form
with the code:


.....
asm = [Assembly].LoadFrom("MyAssembly.dll")
obj = asm.CreateIstance("MyAssembly.SingletonForm")


The program give an error because it can't
find a constructor.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • using singleton inside assembly
    2004-08-17 21:58:47  mikkel@mtk.dk [View]

    When you have included the SingletonForm class in an assembly, you should just reference the assembly from within Visual Studio. Then you can write the code as following:

    MyAssembly.SingletonForm MyForm = MyAssembly.SingletonForm.GetInstance();