Home > C# Programming > Quizzes > C# Programming Fundamentals Test 2
C# Programming Fundamentals Test 2
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 50% Most missed: “What is the result of the following code?”
C# Programming Fundamentals Test 2
Time left 00:00
25 Questions

1. Csharp provides an XML documentation comment syntax by prefacing your comment lines with...
2. What are the access modifiers available in C#?
3. What does if((number <= 10) && (number >= 0)) evaluate to if number is -6?
4. bool test = true; string result = test ? 'abc' : 'def'; What is the value of result after execution?
5. Consider the following code: static void Set(ref object value) { value = 'a string'; } static void Main(string[] args) { object value = 2; Set(ref value); } After the call to 'Set' - what will the value in 'value' be?
6. In the context of (A | B) and (A || B) - the (A || B) boolean evaluation is known as what?
7. What type of memory management does Csharp employ?
8. Valid parameter types for Indexers in C# are...
9. Given the C# syntax for a method - attributes modifiers return-type method-name(parameters ) - what does the attribute [Conditional('DEBUG')] on a method indicate?
10. True or False: We can create a sealed abstract class in c#.
11. Which statement is a convenient way to iterate over items in an array?
12. Which of the following is an example of an auto implemented property?
13. Which keyword would be used in the class definition if we did not want to create an instance of that class?
14. In C# - a subroutine is called a ________.
15. Which of these is NOT a way to create an int array?
16. A static member of a class is:
17. Which option below is an Operator?
18. abstract class BaseClass { public abstract Color Color { get { return Color.Red; } } } sealed class Blues: BaseClass { public override Color Color { get { return Color.Blue; } } } BaseClass test = new Blues(); What is the result of test.Color ?
19. namespace DocGen { class Skills { public void Test(T t) { } } } According to C# standards and specifications - the documentation generator ID string corresponding to 'Test' method from the code above should be:
20. An Indexer in C# allows you to index a
21. From which class do you need to derive to implement a custom attribute?
22. Given the following C# statement: int[] myInts = { 5 - 10 - 15 }; What is the value of myInts[1]?
23. The C# statement: using System; means...
24. In C# 'new' keyword is used to...
25. Where would you find the definition for the Stack class?