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 1
1
using System ;
2
2
using System . IO ;
3
3
using System . Collections . Generic ;
4
+ using System . Threading ;
4
5
5
6
namespace Statements
6
7
{
@@ -9,7 +10,7 @@ class Class
9
10
10
11
static void Main ( )
11
12
{
12
- block :
13
+ block :
13
14
{
14
15
{
15
16
}
@@ -166,8 +167,8 @@ static void MainGoto(string[] args)
166
167
{
167
168
int i = 0 ;
168
169
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 ;
171
172
}
172
173
173
174
static int Add ( int a , int b )
@@ -272,9 +273,19 @@ static void MainUsing()
272
273
static void MainLabeled ( )
273
274
{
274
275
goto Label ;
275
- Label :
276
+ Label :
276
277
int x = 23 ;
277
278
x = 9 ;
278
279
}
280
+
281
+ private readonly Lock lockObject = new Lock ( ) ;
282
+
283
+ public void LockMethod ( )
284
+ {
285
+ lock ( lockObject )
286
+ {
287
+ Console . WriteLine ( "Locked" ) ;
288
+ }
289
+ }
279
290
}
280
291
}
You can’t perform that action at this time.
0 commit comments