I use to develop with eclipse and am missing some things on VisualStudio 2013
As you can see in the gif below, I can use a ctrl + t shortcut to see which classess are imlpementing my interface IFoo so I can see the details (in this case Microwave51 class)..How can I do the same trick on VS-2013,
This question here is pretty good but only since 2015
Edit:
If I do Right click on the interface declaration and click "Go To Implementation" I get only this:
If you have ReSharper...
Right click on the interface declaration and click "Go To Implementation."
If you don't...
Right click on the interface and "Find All References." Gotta look through the results manually.
Related
I have installed VS2017 Enterprise 15.9.11 on a new laptop with latest resharper and when I click Ctrl + . on a class type the Quick Actions and Refactorings menu opens but extract interface is missing.
Any idea why it is not showing?
If all the methods in the class are static, you can't use an Interface, so it won't display that option. Just get rid of all static methods - they're a nuisance and a bad idea anyway.
I have huge list of constants. I want show where this all constants are used in throughout solution. I can check this (using find in solution) one by one but it will take lot of time.
is their any way so I can achieve this very quickly ?
Regards,
Sachin
There is a complete list of Visual Studio Shortcuts available here https://msdn.microsoft.com/en-us/library/da5kh0wa.aspx. As already mentioned the default shortcut for go to Edit.FindAllReferences is Shift + F12.
Also if you rightclick a symbol in your code you can find the available actions in the context menu (+ hotkeys to use them) which may be easier if you are new to Visual Studio, because the list is quite huge.
"Find all references" is the easiest buit-in way to go, but that requires clicking through them one by one. "Find all references" can be accessed using the context menu or (by default) CTRL+K,R.
If you have VS2013 Ultimate and if your constants are in the same project or in the same file/class, you could use CodeMap. Right click on project/file and select "Show on Code Map". Or select Architecture-Generate dependency graph. This will draw you a graphical view of the usage. For example:
You can then filter this Graph by Project/Namespace/Class level.
Also, ReSharper has built-in analyzing features:
Here's some documentation about ReSharper's features.
May be you can try Alt + F12 [peek Definition]
In VS 2010, is there a way to see all the Methods in a docked window for the currently viewed class. Clicking the method would let me navigate to it.
This question is for design mode, while editing a class in the IDE.
I own Resharper, but don't see a way to see all the methods in a nice list as a feature.
If you have Resharper at your disposal as you indicate, you can use the File Structure window. It looks like this:
To open it, click Resharper, Windows, "File Structure". The window is dockable, and updates as your current file changes.
View -> Class View or Ctrl+Shift+C
You see the different classes on the top panel and the methods on the bottom panel.
Also, you have the method list on the top part of your tab:
You have VS 2012. This version has enancements in Solution Explorer.
If you expand a class file node you will see all classes.
And if you expand a class node you will see all its members.
See http://blog.wpfwonderland.com/2012/08/04/visual-studio-2012-tidbits-01-class-members-in-solution-explorer for an explanation.
Is there a way in Visual Studio 2010 to add a new file (class) to a project that inherits from an existing base class, abstract or otherwise? This seems like a simple concept but I can't find a way to do it.
I'd like to be able to for example right click a class name in the IDE and and select "add new inheriting class" or something similar. Just one of those things that would save a lot of repetition. Ideally it would implement (generate stubs) for abstract members, etc.
Does anyone know a way to do this either through stock VS2010 or ReSharper? I've dug through both and can't find anything. Interestingly enough, Resharper will allow for generating a superclass, but not a subclass..
I don't think it's actually faster to right click -> add base class then to add a class file and type : Base behind it.
If you want to implement an abstract class you can right click on the base class and select "Implement Abstract Members"
You can also use the Class Diagram tool (right click a project and select View Class Diagram) then add a class and drag an inheritance arrow from the toolbox onto it.
If you are adding Form or User control, this option is available in VS2010, under Windows Forms Tab.
You could create a new item template for the base class(es) you find yourself using most often. Or you could extend Visual Studio and roll your own.
I know this is quite lazy but, is there any way on Visual C# 2010 Express to auto-generate an interface implementation? (I don't mean at runtime but at design time, like a code snippet). Perhaps with a third party utility?
I'm not familiar with Express enough to know if they removed this feature, but you should just be able to right-click your public class MyClass : MyInterface statement and choose "Implement Inteface".
If this is removed in Express, you can always use Resharper for this feature.
Right click on the interface name, you should see a menu option "Implement Interface" or along those lines.
With the cursor on the interface name, you can also press CTRL + . to get the same context menu and options.
In Microsoft Visual Basic 2010 Express, I just put the cursor to the end of the Implements line and press Enter - then the stubs are generated automatically
Public Class Class1
Implements IMyInterface1
move the cursor to the end of the word IMyInterface1 and press Enter