C# 2 - Basic

Print the objectives

  Take a beta test

This exam tests the developers C# knowledge. More advanced parts of the language are covered in the intermediate exam.

Because we are developers before being Java developers, this site welcomes interesting non-Java technologies that a (Java) developer might need in his career (JavaScript, Ruby and now ... C#).

C# is technically a very well though language. Liking Microsoft or not is another story that we don't want to debate on JavaBlackBelt.

  Released  Beta  Frozen  

Arrays  2 questions

Identify the three possible types of arrays in C#:
  • One-dimensional
  • Multidimensional
  • Jagged
Identify correct and incorrect statemes about the array types.
Write code to instantiate the different array types correctly.
Know the fact that all arrays are objects.
9 1 7

Classes  1 question

Define a simple class according to the C# NamingConventions
Use the using keyword to provide aliases for namespaces.
Write static constructors for classes.
Write nested classes.
Write code that declares static classes.
12 8 6

Collections  2 questions

Write code that uses the following collection classes (NO GENERICS):
  • ArrayList
  • Queue
  • Stack
Identify correct and incorrect statements about these three collections.
4 2 9

Control structures  3 questions

Write code which makes proper usage of the:
  • if-else
  • for
  • foreach
  • while
  • do-while
  • switch
structures.
3 4 13

Variable declaration  3 questions

Know the differences between a heap and a stack variable.
Understand that a reference points to an object.
Understand and use the following variable types:

  • int
  • bool
  • float
  • double
  • decimal
  • char
  • byte
  • short
  • string
Identify the correct scopes for a variable(class,instance,method,local)
Understand the difference between an object and a struture.

6 2 9

Boxing  2 questions

Identify correct and incorrect statements about Unboxing/Boxing.
Identify code that makes correct / incorrect usage of Boxing and Unboxing.
Understand the fact that boxing costs performance.
Recognize where boxing is used and where not.
2 1 7

Operators  3 questions

Write code that uses the following operators:
  • +
  • -
  • /
  • *
  • +=
  • -=
  • *=
  • /=
  • ++
  • --
Write logical expressions that uses the following logical operators:
  • !=
  • ==
  • !
  • &=
  • &&
  • |
  • |=
Be aware of the difference between short circuit and normal expression evaluation.
Write code that makes proper usage of the ternary operator.
4 3 11

Methods  2 questions

Write code that defines methods according to the .NET Framework Design Guidelines NamingConventions:
(ToString instead of toString in Java)
Write code that declares a variable parameter list on a method
Declare ref and out parameters for methods
4 1 14

Exception Handling  2 questions

Use the try/catch/finally statement to handle exceptional program flows.
Identify the order of try-catch blocks.
Identify code that makes incorrect or correct use of try-catch-finally structures.
1 0 9

Garbage Collection  2 questions

Identify the fact that the C# Language has a garbage collecting system.
Write code that makes objects eligible for gc.
Describe in short the GC algorithm and how to may force the garbage collector to start a garbage collection.
Identify situations in which an object will be eligible for garabe-collection.
Identify the disadvantages of finalizers.
Know the fact the the compiler translates finalizers to a Finalize method which is not allowed to be written manually by the developer.
Write code that declares finalizers.
Use the methods of the Class System.GC to influence the GC process.
3 1 5

Resource Management  2 questions

Write code that uses the using keyword to automatically release a IDisposable Object.
Write code that implements the IDisposable Interface correctly.
Identify the advantages of implementing IDisposable over using Finalizers and also the disadvantages of their usage
4 3 3

Objects  1 question

Write Code that instantiates an object.
Use the following objects to write code:
  • System.String
  • System.Object
  • System.Text.StringBuilder
Identify System.String as an immutable object.
Identify the most important difference between a StringBuilder and a String.
Identify System.Object as the root of all classes.
7 3 3

Exam information

  • 37 minutes
  • 25 questions (184)
  • 82% required
  • +3 √
  • - 10  points
  • 15 day delay
  • status: under construction

Exam leader

Top contributors