|
-
Oct 29th, 2002, 12:20 AM
#1
Thread Starter
New Member
javascript prototype functionality?
i'm curious if there is a way in vb.net to accomplish what javascript offers with prototyping, where you can add custom methods to a built-in class. in particular, i wanted to add some custom methods to the string class. i thought about inheritence, but it doesn't look like you can create a class that inherits the string class.
any ideas?
thanks,
glenn
-
Oct 29th, 2002, 01:24 AM
#2
PowerPoster
You can create a new class, and implement all the methods and properties of the string class. Then just add your custom ones. Basically you would have a string variable in your class, then when someone calls a method, you would in turn call your string variables corrisponding method. Like you said, I don't think you can inherit the string class by normal means.
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
|