Click to See Complete Forum and Search --> : javascript prototype functionality?
gacaccia
Oct 28th, 2002, 11:20 PM
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
hellswraith
Oct 29th, 2002, 12:24 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.