What is the extension of the project file in .Net?
.proj
.project
.sln
.prj
Which of the following code sample implements the Count property?
// Property Syntax
class CSharp
{
private int _count;
public string _count
{
get
{
return _count;
}
set
{
_count = value;
}
}
}
// Property Syntax
class CSharp
{
private int _count;
public int _count
{
get
{
return _count;
}
set
{
_count = value;
}
}
}
// Property Syntax
class CSharp
{
private int _count;
public int Count
{
get
{
return _count;
}
set
{
_count = value;
}
}
}
// Property Syntax
class CSharp
{
private int _count;
public int Count
{
get
{
return Count;
}
set
{
Count = value;
}
}
}
Which one is the correct declaration for Main method?
public static int Main()
public int Main(string args)
public static void main(string[] args)
public static void Main(string[] args)
What compiler flag generates XML documentation?
/xml
/generateDoc
/doc
//xml
What is the console output for the above code sample?
static void Main(string[] args)
{
try
{
Console.WriteLine("Level 1");
try
{
Console.WriteLine("Level 2");
goto exit;
}
finally
{
Console.WriteLine("Level 2 Finished");
}
}
finally
{
Console.WriteLine("Level 1 Finished");
}
exit: ;
Console.Read();
}
Level 1
Level 2
Level 2 Finished
Level 1 Finished
Level 1
Level 2
Level 1 Finished
Level 2 Finished
Level 1
Level 2
Level 1
Level 2
Level 2 Finished