By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,315 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

Overloading string split function

P: n/a
Hi

Is there a way to overload split function from system.string?

Thanks

Regards
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"John" <in**@nospam.infovis.co.ukschrieb
Hi

Is there a way to overload split function from system.string?
Why? What's the target? Usually that's not necessary. If you insist.....
In VB 2008 there are extension methods. Example:

Module Module1
<System.Runtime.CompilerServices.Extension()_
Function Split( _
ByVal value As String, _
ByVal Whatever As Integer) _
As String()

End Function

End Module
AZ

Jun 27 '08 #2

P: n/a
Besides that, you can not inherit from a sealed class string.

"Armin Zingler" wrote:
"John" <in**@nospam.infovis.co.ukschrieb
Hi

Is there a way to overload split function from system.string?

Why? What's the target? Usually that's not necessary. If you insist.....
In VB 2008 there are extension methods. Example:

Module Module1
<System.Runtime.CompilerServices.Extension()_
Function Split( _
ByVal value As String, _
ByVal Whatever As Integer) _
As String()

End Function

End Module
AZ

Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.