|
-
Dec 2nd, 2003, 03:16 AM
#1
Thread Starter
Lively Member
Is this possible with Overloading ?
I want to overload this function thrice..
The first parameter (SourceString) is always passed.
The next two parameters...
Sometimes both can be passed or only and any one can be passed.
When all both (Starts_After and Ends_Before) are passed.
Public Overloads Function fnExtract(
ByVal SourceString As String, _
ByVal Starts_After As String, _
ByVal Ends_Before As String) As String
When only second (Starts_After) is passed
Public Overloads Function fnExtract(
ByVal SourceString As String, _
ByVal Starts_After As String) As String
When only last (Ends_Before) is passed
Public Overloads Function fnExtract(
ByVal SourceString As String, _
ByVal Ends_Before As String) As String
Now this is wrong.. because the last two are identical.
I also donot want to use Optional Parameters.
So how do I tackle it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|