Adds a link into exceptions list. This tag lets you specify which exceptions a member can throw. XML comment may contain any number of <exception> tags.

Syntax

<exception cref="reference">description</exception>

Reference should point to some Exception class in your project. Warning appears during compilation if reference points to non-existing target. Description describes situation when this exception is thrown.

Examples

Visual Basic

''' <exception cref="TestDLL.DllClass1.nestedException">

''' If something horrible happens.</exception>

Function method1(ByVal x() As Integer, ByVal y As String) As Boolean

C#

/// <exception cref="TestDLL.DllClass1.nestedException">

/// If something horrible happens.</exception>

public bool method1(int[] x, string y)

 

See Also

Reference Format