Following examples in my C# book and I came across a book example that doesn\'t work in Visual Studio. It deals with creating your own exceptions, this one in particular is
Since .NET 3.0 custom exceptions should be derived from Exception and not ApplicationException, so use this:
public class NegativeNumberException : Exception
{
public NegativeNumberException():base() { }
public NegativeNumberException (string message): base(message) { }
}