Home > C# Programming > Quizzes > C# (C-Sharp) Quiz
C# (C-Sharp) Quiz
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 21% Most missed: “What is the difference between a.Equals(b) and a == b?”

C# MCQs For LinkedIn Skill Assessments.

C# (C-Sharp) Quiz
Time left 00:00
25 Questions

1. What will be returned when this method is executed?
'public void userInput(string charParamters) { }
2. What is the correct way to write an event named apiResult based on a delegate named ResultCallback?
3. What is the difference between a.Equals(b) and a == b?
4. Which characteristic prevents this code from compiling?
'public int age='28'
5. Given this enumeration, how would you access the integer-type value of 'AppState.Loading'?
'enum AppState { OffLine, Loading, Ready }
6. What is the difference between a static and non-static method?
7. What is the difference between finally and finalize blocks?
8. When would you use generics in your code?
9. What is a thread pool?
10. How do you indicate that a string might be null?
11. How would you write an enum variable called AppState with values for Offline, Loading, and Ready?
12. In what order would the employee names in this example be printed to the console?
cs
string[] employees = { 'Joe', 'Bob', 'Carol', 'Alice', 'Will' };
IEnumerable employeeQuery = from person in employees
orderby person
select person;
foreach(string employee in employeeQuery)
{
Console.WriteLine(employee);
}
13. What is the difference between the 'break' and 'continue' keywords?
14. Which choice represents a class that inherits behavior from a base class?
15. How would you serialize this class?
'public class User {}
16. How does the async keyword work?
17. When using a thread pool what happens to a given thread after it finishes its task?
18. What is the difference between an anonymous type and a regular data type?
19. What is the main difference between a value type and a reference type?
20. Do you need to declare an out variable before you use it?
21. Lambda expressions are often used in tandem with which of the following?
22. How would you write a delegate named ResultCallback with an int parameter named responseCode?
23. What is the difference between throw exceptions and throw clauses?
24. Which code snippet declares an anonymous type named userData?
25. What is true about virtual methods?