Posted By

LeeRJohnson on 02/18/08


Tagged

xml c exception tag documentation Sharp


Versions (?)

exception tag C Sharp XML Documentation


 / Published in: HTML
 

URL: http://msdn2.microsoft.com/en-us/library/w1htk11d(VS.80).aspx

The tag lets you specify which exceptions can be thrown. This tag can be applied to definitions for methods, properties, events, and indexers.

  1. // compile with: /doc:DocFileName.xml
  2.  
  3. /// comment for class
  4. public class EClass : System.Exception
  5. {
  6. // class definition...
  7. }
  8.  
  9. /// comment for class
  10. class TestClass
  11. {
  12. /// <exception cref="System.Exception">Thrown when...</exception>
  13. public void DoSomething()
  14. {
  15. try
  16. {
  17. }
  18. catch (EClass)
  19. {
  20. }
  21. }
  22. }

Report this snippet  

You need to login to post a comment.