I am trying to use the n-tier arrangement so elegantly set up in TBH in a VB
.NET Windows application. I have created the code exactly? as in TBH but I am having a problem with the line
_instance = CType(Activator.CreateInstance( _
When it executes it successfully retrieves the Contracts.ProviderType from the ProviderType property in ConfigSection.vb
but then errors with the following:
Value cannot be null.
Parameter name: type
The reason would appear to be because the Public Sub New routine is not triggered as it is when TBH runs. (One of the tips in the error explanation is "Use the 'new' keyword to create an object instance".)
Should the New sub be automatically triggered as in the ASP.NET version, or do I need to do something different for a Windows application?