mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
43 lines
584 B
C#
43 lines
584 B
C#
using System;
|
|
|
|
class CompileTimeOperators
|
|
{
|
|
int Default()
|
|
{
|
|
return default(int);
|
|
}
|
|
|
|
int Sizeof()
|
|
{
|
|
return sizeof(int);
|
|
}
|
|
|
|
Type Typeof()
|
|
{
|
|
return typeof(int);
|
|
}
|
|
|
|
string Nameof(int i)
|
|
{
|
|
return nameof(i);
|
|
}
|
|
}
|
|
|
|
class GotoInTryFinally
|
|
{
|
|
void M()
|
|
{
|
|
try
|
|
{
|
|
goto End;
|
|
Console.WriteLine("Dead");
|
|
}
|
|
finally
|
|
{
|
|
Console.WriteLine("Finally");
|
|
}
|
|
Console.WriteLine("Dead");
|
|
End: Console.WriteLine("End");
|
|
}
|
|
}
|