Julie Lerman's DevLife

DevLife Part I [May 2005 - March 2007]

My Links

Blog Stats

News

A blog for DevSource.com.

This blog was originally part of the blogs.ziffdavis.com site from May 2005 through June 2007 when the blog was moved to the Movable Type blog engine and hosted at blog.devsource.com/devlife.
The original blog was eventually shut down and I was given the posts so that I could host them on my own site.


Archives

Aha! That's how to get at the overrides in VB2005!

Everytime I am in a situation in Visual Basic 2005 where I have inherited from a class and want to override a method, I have struggled to find how to do it. Usually I just give up and code it by hand, knowing that this just can't be right.

In VB 2003, I was used to having Overrides show up in the class dropdowns. When that is selected, then the methods on the right showed all of the members that can be overridden. Here is an example of that where I have inherited a button. My drop down lists shows all of the things I can override from the Button class.

In C# in Visual Studio 2005, it is pretty easy because you get a SmartTag when you inherit from a class.

 
I kept looking for one of those two methods when inheriting in Visual Basic in VS2005. But it is different still. The way to get at the overrides in VB2005 is to type "overrides" and then intellisense kicks in. Pretty logical, but as I was expecting one of the other two ways it took a while before I  found this by chance (as I hadn't gotten to the point of actually looking in the docs for this).

Note: In case you were curious about the SecurityContextToken I was experimenting with, SCTs are not serializable so it didn't work out.

posted on Sunday, January 15, 2006 10:50 AM