Archive for the ‘Did you know’ Category
Finding a CSS Class Definition
A couple of weeks ago I pointed out that you could easily find the definition of a property, method, variable, or class by right-clicking the item and selecting, “Go To Definition” from the context menu.
You can also use this feature in your ASPX files to find the definition of CSS classes. However, you cannot use this to find definitions of rules. And if the class is not defined, you will not see the menu option and you’ll get a green squiggly under the class and the tooltip will tell you that the class is not defined.
Renaming Properties, Methods and Variables
Have you ever written some code and named something one thing only to realize that it should be named something else?
If you haven’t you haven’t been programming for very long. Maybe you started a new job and you spent two weeks writing code using your previous employer’s naming conventions only to find out that this employer expects things to be named slightly differently.
So now you not only have the item named incorrectly, but you’ve referenced it from other files, so it isn’t a simple matter of just giving it a new name. No, the code that is referencing it has to be changed as well. So what are you going to do?
Advantages of Using Class Diagram
One of the new tools that showed up in Visual Studio 2005 that I don’t see many people taking much advantage of is the Class Diagram.
The class diagram displays the classes you drag onto it in a visual representation much like a UML class diagram does. It also lets you see relationships between your classes. But the greatest power in the Class Diagram is that it will write a lot of your code for you.
Easily Find Classes, Methods, and Variables
There is a bit of a “trick” that I use routinely in Visual Studio to help me find the definition of Classes, Methods, and Variables in my solution regardless.
This “trick” works in both CSharp and in VB.NET and, if you don’t know it already, will save you a ton of time.
Automatic Implementation of Interfaces
It’s been a while since I’ve posted a video on this site because I only do videos for things that are better explained by showing you how something works. Most of what we’ve been looking at is code, which is better explained by using… well… just code.
But today, we need to SHOW you a feature of Visual Studio that will allow you to implement your interfaces a lot faster than you are probably use to. In fact, I would be willing to bet that most of you don’t even know that this feature is here.
So….

