ITemplate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Umm...this wont work

Public Class MyTemplat
Inherits ITemplat

End Clas

I get an error stating that classes can only inherit from classes

C# allows you to do this simpl

Public Class MyTemplate : ITemplat




However, for this project I'm bound to use VB rather than C# but am now stuck on this thing...any help would be great.
 
Demetri said:
Umm...this wont work?

Public Class MyTemplate
Inherits ITemplate

End Class

I get an error stating that classes can only inherit from classes.

C# allows you to do this simply

Public Class MyTemplate : ITemplate
{

}

However, for this project I'm bound to use VB rather than C# but am
now stuck on this thing...any help would be great.


Only interfaces can inherit from an interface. Classes can inherit from
classes and *implement* interfaces:

public class MyTemplate
IMPLEMENTS ITemplate

end class


BTW, that's also part of the VB docs ;-)
http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconInterfaces.asp
 
Yeah, it dawned on me after I posted - duh.

Thanks for the response tho.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top