Compiler Error CS0724

does not need a CLSCompliant attribute because the assembly does not have a CLSCompliant attribute

The following example generates CS0724 because of the throw statement inside the finally clause block.

Example

The following example generates CS0724.

// CS0724.cs
using System;

class X
{
    static void Test()
    {
        try
        {
            throw new Exception();
        }
        catch
        {
            try
            {
            }
            finally
            {
                throw; // CS0724
            }
        }
    }

    static void Main()
    {
    }
}