NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error CS1017

Try statement already has an empty catch block

A catch block that does not take any parameters must be the last in a series of catch blocks.

The following sample generates CS1017:

using System;
namespace x {
   public class b : Exception {
   }

   public class a {
      public static void Main() {
         try {
         }
         catch {      // CS1017, must be last catch
         }

         catch(b) {
            throw;
         }
      }
   }
}

See Also

Exception Handling Statements