[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / test-216.cs
blob9c9f5f1a9f5d18a6f8295cbfb756d837d779ce4e
1 //
2 // A compilation test: accessing an event from a nested class.
3 // Bug 48710
4 //
5 using System;
7 public delegate void OnWhateverDelegate( string s );
9 class cls
11 public event OnWhateverDelegate OnWhatever;
13 class nestedcls
15 internal void CallParentDel( cls c, string s )
17 c.OnWhatever( s );
20 internal void CallMyDel( string s)
22 (new nestedcls()).CallParentDel( this, s );
26 class MonoEmbed
28 public static void Main()
30 cls c = new cls();
31 c.OnWhatever += new OnWhateverDelegate( Whatever );
32 c.CallMyDel( "test" );
34 static void Whatever( string s )
36 Console.WriteLine( s );