Posted By

Jamon on 10/03/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


C#: Analyze unsafe method invokes


 / Published in: C#
 

  1. class A
  2. {
  3. public static vois f()
  4. {
  5. try
  6. {
  7. ... B.DoSome(); // safe call, exceptions handled
  8. }
  9. catch(Exception e)
  10. {
  11. ...
  12. }
  13. }
  14.  
  15. public static void f2()
  16. {
  17. ... //no try-catch block
  18. B.DoSome(); // possible unhandled exception
  19. }
  20. }
  21.  
  22. class B
  23. {
  24. public static void DoSome()
  25. {
  26. ...
  27. //no try-catch block, possible to raise unhandled exception
  28.  
  29. }
  30. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Jamon on October 3, 2010

problem: I want analyze me project to find such calls as in method f2 - unsafe call of B.DoSome()

Posted By: Jamon on October 3, 2010

*my project

You need to login to post a comment.