Guest GraphiteCube Posted November 4, 2009 Share Posted November 4, 2009 Hello. In NetBeans, there is a function to let the IDE to manage references to different packages automatically. For example, if I have "Scanner" type of object in my code, when I press Fix Imports, NetBeans will automatically add "import java.util.Scanner;". I want to know if Visual Studio has similar functions? Thanks. :) Link to comment Share on other sites More sharing options...
0 Eric Veteran Posted November 4, 2009 Veteran Share Posted November 4, 2009 The closest I know of is that the IDE will tell you that you may be missing a reference or "using" statement if the software won't compile. Link to comment Share on other sites More sharing options...
0 Scott Hellewell Posted November 4, 2009 Share Posted November 4, 2009 I want to know if Visual Studio has similar functions?Thanks. :) In Visual Studio when your cursor is on the word you want resolved, hit ctrl + . Then it will let you pick from adding the using statement or changing your object to a full named reference. Link to comment Share on other sites More sharing options...
0 Antaris Veteran Posted November 4, 2009 Veteran Share Posted November 4, 2009 ^ As Ottsca said, VS can resolve those issues for you. I also use Resharper which I feel is better at highlighting and managing your using statements. Link to comment Share on other sites More sharing options...
0 BGM Posted November 5, 2009 Share Posted November 5, 2009 In Visual Studio when your cursor is on the word you want resolved, hit ctrl + . Then it will let you pick from adding the using statement or changing your object to a full named reference. yep, do this :) Link to comment Share on other sites More sharing options...
0 wrack Posted November 9, 2009 Share Posted November 9, 2009 In Visual Studio when your cursor is on the word you want resolved, hit ctrl + . Then it will let you pick from adding the using statement or changing your object to a full named reference. Keep in mind that this only works if proper references have been added to the assembly. Also if there are more than 1 objects of the same name then it gets confused. But in most of the cases it does work pretty well. Link to comment Share on other sites More sharing options...
0 Antaris Veteran Posted November 9, 2009 Veteran Share Posted November 9, 2009 Keep in mind that this only works if proper references have been added to the assembly. Also if there are more than 1 objects of the same name then it gets confused. But in most of the cases it does work pretty well. One of the things I love about resharper, sometimes it can highlight that you may need to reference a specific assembly. Not sure just how expansive this feature is, but its a welcome one! Link to comment Share on other sites More sharing options...
0 wrack Posted November 18, 2009 Share Posted November 18, 2009 We use DevExpress CodeRush and Refactor! Pro. Link to comment Share on other sites More sharing options...
Question
Guest GraphiteCube
Hello. In NetBeans, there is a function to let the IDE to manage references to different packages automatically.
For example, if I have "Scanner" type of object in my code, when I press Fix Imports, NetBeans will automatically add "import java.util.Scanner;".
I want to know if Visual Studio has similar functions?
Thanks. :)
Link to comment
Share on other sites
7 answers to this question
Recommended Posts