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
 
Back
Top