Add code example for foreach over delegate.
Merge pull request #658 from quickfur/issue4954

Add code example for foreach over delegate.