Paul,
In addition to Herfried's response.
Should you be considering different classes?
Public Class BaseClass
Public Sub New()
' common construction
End Sub
End Class
Public Class Case1Class
Inherits BaseClass
Public Sub New()
MyBase.New()
' Case 1 specific construction
End Sub
End Class
Public Class Case2Class
Inherits BaseClass
Public Sub New()
MyBase.New()
' Case 2 specific construction
End Sub
End Class
Public Class Case1Class
Inherits BaseClass
Public Sub New()
MyBase.New()
' Case 3 specific construction
End Sub
End Class
With creating derived classes you can have methods & fields that are
specific to each derived class.
Hope this helps
Jay
"Paul Bromley" <fl*******@dsl.pipex.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have just started to use Classes a lot in my code. Often I find that I
need to use the same contstructor, but wish to invoke a different action
depending on where I am clling the class from. I hav therefors started
sending an extra parameter to initialise the Class that I tend to call
sArea. I then use this in my code with a series of Select Statements in
the constructor, so that I can use the same constructor for parameters, but
carry out different actions depending on the case statement.
Is this an acceptable way of doing this or should I be looking at doing
something different??
Best wishes
Paul Bromley