I've opened a file, written by someone else, in a project in Xamarin Studio. I'm a C++ developer myself, but I have some experience with .NET. Coming from a C++ background, I find it pretty strange that I see namespaces used all over the place, only to see "using xx" at the top of a file. Old habits die hard, I know, so I'm not going to complain.
However, how can I quickly see which classes used inside the file are coming from which namespace?
Asked
Active
Viewed 259 times
0

neeohw
- 555
- 4
- 12
-
Basically not. There is no way to do so in Xamarin Studio. I think Visual Studio or at least Resharper offer this kind of search. On the other hand, for what purpose do you need that information? – Kolja Nov 14 '15 at 11:09
-
I want to cut out a class that implements Business Logic to test it without the full stack. But because of dependencies to a certain namespace (not handled by interfaces), I want to see which code actually references classes inside that other namespace. That way I can see which code from the other namespace is also tested when I run my tests. – neeohw Nov 14 '15 at 12:25
-
Well you can see it programatticly using reflection. Which is a C# library. Maybe this question will help you. http://stackoverflow.com/questions/79693/getting-all-types-in-a-namespace-via-reflection – Ege Aydın Nov 16 '15 at 11:05
-
I don't think you really understood the question. Reflection will not tell me where exactly in the code there are references to the namespace. Reflection will only tell me what's available in the namespace. – neeohw Nov 16 '15 at 11:29