J
John
Hi
I have written a Split function which in turn calls the standard string
split function. Code is below;
Function Split1(ByVal Expression As String, Optional ByVal Delimiter As
String = " ", Optional ByVal Limit As Integer = -1, Optional ByVal Compare
As CompareMethod = CompareMethod.Binary, Optional ByVal MaxLength As Integer
= 0) As String()
InAr = Expression.Split(Delimiter, Limit, Compare)
End Function
My questions are ;
1. Passing the Limit parameter causes a runtime error as the default for
Limit (-1) is not acceptable. What is the problem? I have a feeling the
syntax of split function in MSDN
(http://msdn.microsoft.com/en-gb/library/6x627e5f.aspx) may be out dated.
2. How can I overloaded my split function with standard split function so I
can use is as St.Split(...)?
Thanks
Regards
I have written a Split function which in turn calls the standard string
split function. Code is below;
Function Split1(ByVal Expression As String, Optional ByVal Delimiter As
String = " ", Optional ByVal Limit As Integer = -1, Optional ByVal Compare
As CompareMethod = CompareMethod.Binary, Optional ByVal MaxLength As Integer
= 0) As String()
InAr = Expression.Split(Delimiter, Limit, Compare)
End Function
My questions are ;
1. Passing the Limit parameter causes a runtime error as the default for
Limit (-1) is not acceptable. What is the problem? I have a feeling the
syntax of split function in MSDN
(http://msdn.microsoft.com/en-gb/library/6x627e5f.aspx) may be out dated.
2. How can I overloaded my split function with standard split function so I
can use is as St.Split(...)?
Thanks
Regards