File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
csharp/ql/test/library-tests/statements Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . IO ;
33using System . Collections . Generic ;
4+ using System . Threading ;
45
56namespace Statements
67{
@@ -9,7 +10,7 @@ class Class
910
1011 static void Main ( )
1112 {
12- block :
13+ block :
1314 {
1415 {
1516 }
@@ -166,8 +167,8 @@ static void MainGoto(string[] args)
166167 {
167168 int i = 0 ;
168169 goto check ;
169- loop : Console . WriteLine ( args [ i ++ ] ) ;
170- check : if ( i < args . Length ) goto loop ;
170+ loop : Console . WriteLine ( args [ i ++ ] ) ;
171+ check : if ( i < args . Length ) goto loop ;
171172 }
172173
173174 static int Add ( int a , int b )
@@ -272,9 +273,19 @@ static void MainUsing()
272273 static void MainLabeled ( )
273274 {
274275 goto Label ;
275- Label :
276+ Label :
276277 int x = 23 ;
277278 x = 9 ;
278279 }
280+
281+ private readonly Lock lockObject = new Lock ( ) ;
282+
283+ public void LockMethod ( )
284+ {
285+ lock ( lockObject )
286+ {
287+ Console . WriteLine ( "Locked" ) ;
288+ }
289+ }
279290 }
280291}
You can’t perform that action at this time.
0 commit comments