Reputation:
This is one of the things I find infuriating about C#. I have thsi massive library im trying to use right now and for some reason the people who create the code examples are not smart enough to include the namespaces you need to import in the examples. This is usualyl the case. I find myself searching through the namespace, hundreds sometimes nested trying to figure out which ones i need to import. In java netbeans, it even tells me which packages to import because it searches for me. But in C# i always waste countless time searching through the namespace manually.
Is there any way I can get around this. Like right now im trying to find which namespace contains TwitterCredentials for Tweetinvi library.
Seriously, why do people not include the namespace in code examples. It's just stupid not to! And why does visual studio not make suggestions like java. It's just common sense really....
Upvotes: 0
Views: 235
Reputation: 2087
I am the developer of Tweetinvi :)
ALL the classes you need in Tweetinvi are located in the Tweetinvi.Core.* namespace.
To answer your question regarding Namespaces and why I do not include them in the examples. The reason is that as mentioned by Reza Aghaei Visual Studio and Resharper allow developers to include namespaces.
Furthermore as you mentioned the library is big and therefore multiple namespaces might be required and I am not going to add all of them in each example. Otherwise the documentation would just be huge.
I hope you will like the library and please feel free to ask any question here on stackoverflow or on github.
Happy coding.
PS: By the way you can also use Github to search for filename with a 't' keystroke on the Source Code page.
Upvotes: 0
Reputation: 125217
You can press Ctrl + . on each word that has error or point to small blue bar under the word and click on dropdown, and use offered namespace.
Upvotes: 6