views:

25

answers:

1

How to find all Exception classes represented for example in System.IO namespace. Is it possible to do in VS?

+2  A: 

In the Object Browser, select one of the .Net framework versions (not All Components or My Solution).

You can then expand any class and look at Derived Types. (Note that it will take some time to expand)

Alternatively, look at MSDN.

EDIT: Paste the following into LINQPad:

var mscorlib = typeof(string).Assembly;
var baseType = typeof(Exception);
mscorlib.GetTypes().Where(t => (t.Namespace ?? "").StartsWith("System.IO")
                            && baseType.IsAssignableFrom(t)).Dump();
SLaks
Yeah... but the thing is it gets all the classes and I need to get only within System.IO
Ike
Nice.. very nice :)
Ike