¡@

Home 

c# Programming Glossary: localvars

How can I determine which exceptions can be thrown by a given method?

http://stackoverflow.com/questions/986180/how-can-i-determine-which-exceptions-can-be-thrown-by-a-given-method

HashSet Type var visitedMethods new HashSet MethodBase var localVars new Type ushort.MaxValue var stack new Stack Type GetAllExceptions.. Type GetAllExceptions method exceptionTypes visitedMethods localVars stack 0 return exceptionTypes.ToList .AsReadOnly public static.. Type exceptionTypes HashSet MethodBase visitedMethods Type localVars Stack Type stack int depth var ilReader new ILReader method..