Get benefited from interview Q/A and Online Test section. Subscribe to this blog to get updates directly in your mail box.
Best View in Google Crome, Mozilla firefox or IE 7 or above
Showing posts with label C# Online Test. Show all posts
Showing posts with label C# Online Test. Show all posts

Sunday, March 6, 2011

C# Online Test Questions and Answers

1. Can an Interface be instantiated directly?
Yes
No
It can be instantiated with static constructor
None of these
 

2. What is the Difference between Convert.ToInt32 and Int.Parse?
Both are Same
Int.Parse Can't Handle Null values , It will throws ArgumentNullException Error.
Convert.ToInt32 Can't Handle Null Values ,it will throws ArgumentNullException error.
Both can Handle Null Values
Both can't Handle Null Values
 

3. C# doesnot support:
inheritance
polymorphism
abstraction
multiple inheritance
C# supports all
 

4. Whice is true about Interface and abstract methods?
We can write only one abstract method inside interface.
No method is abstract inside interface
All the methods inside Interface in an abstract method.
None of the above
 

5. Which keyword is used to achieve shadowing in C#?
Abstract
Sealed
New
Shadow
None of the above
 

6. Which of the following class cannot be inherited?
Sealed
Abstract
Both
None
 

7. In C#, the statement that is used to replace multiple if statements is called?
?: (ternary operator)
The switch case statement
The nestedif statement
The #endif statement
None of these
 

8. Which of these is a valid path declaration?
string strPath="c:\\abc.txt";
string strPath="c:/abc.txt";
string strPath=@"c:\abc.txt";
All of these
None of these
 

9. What is the difference between Convert.ToString(str) and str.ToString() method?
Convert.ToString(str) function handles NULL while str.ToString() does not. It will throw a NULL reference exception.
str.ToString() function handles NULL while Convert.ToString(str) does not. It will throw a NULL reference exception.
Both can handle NULL
None can Handle NULL
 

10. Waht does a strong name contain?
assembly name
assembly version
publiuc key
All the above
None of these
 

  © Blogger templates Shiny by Ourblogtemplates.com 2008

Back to TOP