3 public class StaticDelegateWithSameNameAsInstance
5 private Provider _provider
;
6 delegate void Provider (string s
);
13 if (_provider
!= null) {
21 public void StaticCallback ()
24 MyProvider
= StaticCallback
;
27 public static void StaticCallback (string s
)
30 throw new ApplicationException ();
35 public static int Main ()
37 new StaticDelegateWithSameNameAsInstance ().StaticCallback ();
39 Console
.WriteLine (i
);