ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> DevelopMentor-dotNET
DevelopMentor-dotNET
[DOTNET] Interfaces and Base Classes
by C Romanian other posts by this author
Nov 15 2001 10:24PM messages near this date
Re: [DOTNET] Thread.CurrentPrincipal lost after making a call to a remote object? | Re: [DOTNET] WebService
So I finally started coding VB.Net after keeping up with this list for the
last year, I think.  Great job everyone!

I started by creating an interface, IMerchant (part of Assembly1), Function
Load() as String, Property ID as String.  Then I created a Base Class,
Merchant (part of MustInherit Assembly2), Implements Assembly1.IMerchant.
Property ID has some code, Function Load I have it as:

<code> 
Public MustOverride Function Load() As String Implements
Assembly1.IMerchant.Load
</code> 

Last, I created the actual class Merchant (Part of Assembly3) that Inherits
Assembly2.Merchant.  In it, I have the override with some code in it:

<code> 
Public Overrides Function Load() As String
  Return "Hello World"
End Function
</code> 

To debug I created a Winforms app, a form with a button.  Click the button,
the OnClick does a New on Assembly3.Merchant.  The code never gets that far.
  Before the event gets fired, I get:

<Error> 
An unhandled exception of type 'System.TypeLoadException' occurred in
system.windows.forms.dll

Additional information: Method Load in type Assembly3.Merchant from assembly
Load does not have an implementation.
</Error> 

What am I missing here?  I tried searching this list with "have an
implementation" but nothing came up.  Can anyone please shed some light on
this.  Thanks much in advance (and sorry for the long post).

C

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved