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
2010-10-07 14:16:51
Yeah... but the thing is it gets all the classes and I need to get only within System.IO
Ike
2010-10-07 14:23:35
Nice.. very nice :)
Ike
2010-10-07 16:02:01