To add to Jon and Jared's answers, I note that the only time you'd usually define a delegate inside a class is if the delegate were a private implementation detail of the class. It is rare and bizarre to have a public delegate definition inside a class.
For example, consider my favourite pattern: an abstract base class that can only be extended by private nested classes that are manufactured with factories:
public abstract class Animal
{
private Animal() { } // prevents subclassing from outside!
private sealed class Giraffe : Animal { }
private sealed class Leopard : Animal { }
public static Animal GetGiraffe( ) { return new Giraffe(); }
public static Animal GetLeopard( ) { return new Leopard(); }
Suppose an implementation detail of Animal was that you needed to have a delegate from Giraffe to Leopard:
private delegate Leopard D(Giraffe g);
This cannot be a public delegate class because it refers to private types!
Nowadays of course you wouldn't even do this. You'd use Func<Giraffe, Leopard>
and you're done.
Therefore, the nested delegate type is pretty much there for completeness and backwards compatibility these days; normally you wouldn't use it.