Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Microsoft .NET Interview Questions and Answers

Ques 11. Methods must declare a return type, what is the keyword used when nothing is returned from the method?

Ans. Void

Is it helpful? Add Comment View Comments
Ques 12. Class methods to should be marked with what keyword?
Ans. Static.
Is it helpful? Add Comment View Comments
Ques 13. A class can have many mains, how does this work?
Ans. Only one of them is run, that is the one marked (public) static, e.g:
public static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
}
private void Main(string[] args, int i)
{
}
Is it helpful? Add Comment View Comments
Ques 14. Does an object need to be made to run main?
Ans. No
Is it helpful? Add Comment View Comments
Ques 15. Write a hello world console application.
Ans. using System;
namespace Console1
{
class Class1
{
[STAThread] // No longer needed
static void Main(string[] args)
{
Console.WriteLine("Hello world");
}
}
}
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2017 WithoutBook