Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inheritance from a method
Message
From
14/01/2006 20:04:12
 
 
To
14/01/2006 20:00:27
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01086877
Message ID:
01086879
Views:
18
>I don't understand the problem, Michel. If the Common class is in the same namespace as your Web Service methods, then you shouldn't have to do anything. If it's not, then you simply have to have an Imports statement that references it. Is this not working for you?

In reality DoCommonProcess() returns a boolean so the proper call I have to do on all the methods that require it would be:
    Public Shared Function GetMessage(ByVal tdDate As Date, ByVal tnForum As Integer) As String
    If Not DoCommonProcess() Then
       Throw New System.Exception("My message here")
    End If
    Return ""
    End Function

    Public Shared Function GetCategory(ByVal tdDate As Date, ByVal tnForum As Integer) As String
    If Not DoCommonProcess() Then
       Throw New System.Exception("My message here")
    End If
    Return ""
    End Function
So, I don't want to repeat the same code for all the methods that need it. That is why I am looking at how I can have GetMessage() and GetCategory() to inherits of that Common.DoCommonProcess() method so I don't have to write the same code over and over again.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform