How To Do MustOverride Sub New

Nov 18, 2011

Is it possible to force the inherited classes to implement a set of New() constructors? I tried with this, but it doesn't work:
MustOverride Sub New()
MustOverride Sub New(Arg1 as Integer)
MustOverride Sub New(Arg1 as String)

View 7 Replies


ADVERTISEMENT

CodeDOM, VBCodeProvider And MustOverride Property?

May 27, 2007

I'm having trouble with CodeDOM and the VBCodeProvider.I want to generate an abstract class with a MustOverride ReadOnly Property.

View 3 Replies

Private Or Protected Set For A MustOverride Property?

Jul 24, 2010

I'd like to have a Private or Protected "Setter" for a property that also happens to be an abstract (MustOverride). I'm porting some code from C# to VB and in C# this is pretty straight forward. In VB not so much (for me anyway).

Some code...

In C#...
public abstract class BaseClassWithAnAbstractProperty
{
public abstract int AnAbstractIntegerProperty { get; protected set; }
}

[Code]....

The issue seems to be the inability to flesh-out the Get/Set specifics in the declaration.

View 2 Replies

Inheritance - Specify A Return Type Of "Derivative(of T)" For A MustOverride Sub In .NET?

Apr 22, 2010

VB.NET 2008 .NET 3.5 I have two base classes that are MustInherit (partial). Let's call one class OrderBase and the other OrderItemBase. specific type of order and order item would inherit from these classes. Let's call these WebOrder (inherits from OrderBase) and WebOrderItem (inherits from OrderItemBase).

Now, in the grand scheme of things WebOrder is a composite class containing a WebOrderItem, like so:

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved