A Basic C# Skills Test- Quiz!

16 Questions

Settings
Please wait...
A Basic C# Skills Test- Quiz!

There are different programming languages in existence and understanding the most basic, which is C# ( C Sharp) can be a little hard for some. The quiz below is designed to help you refresh your memory on what you have covered so far. Give it a shot and see how much you actually know!


Questions and Answers
  • 1. 
    • A. 

      Yes

    • B. 

      No

  • 2. 
    • A. 

      Object

    • B. 

      System.Net

    • C. 

      System.Object

    • D. 

      System

    • E. 

      System.Root

  • 3. 
    • A. 

      ListDictionary

    • B. 

      Stack

    • C. 

      Hashtable

    • D. 

      ArrayList

    • E. 

      StringCollection

  • 4. 
    Will the finally block get executed if an exception has not occurred?
    • A. 

      Yes

    • B. 

      No

  • 5. 
    • A. 

      Yes

    • B. 

      No

  • 6. 
    Does .NET support the ability to inherit multiple interfaces?
    • A. 

      Yes

    • B. 

      No

  • 7. 
    • A. 

      Isolated

    • B. 

      Connected

    • C. 

      Durable

    • D. 

      Atomic

    • E. 

      Integrity

  • 8. 
    The C# keyword "int" maps to which .NET type? 
    • A. 

      System.Int16

    • B. 

      System.Int32

    • C. 

      System.Int64

    • D. 

      System.Int128

  • 9. 
    Which of these statements correctly declares a two-dimensional integer array in C#?
    • A. 

      Int[,] myArray;

    • B. 

      Int[][] myArray;

    • C. 

      Int[2] myArray

    • D. 

      System.Array[2] myArray;

    • E. 

      System.Array[,] myArray;

  • 10. 
    • A. 

      Classes that are both in the same assembly and derived from the declaring class.

    • B. 

      Only methods that are in the same class as the method in question.

    • C. 

      Internal methods can only be called using reflection.

    • D. 

      Classes within the same assembly, and classes derived from the declaring class.

  • 11. 
    • A. 

      Encapsulating an object in a value type.

    • B. 

      Encapsulating a copy of a value type in an object.

    • C. 

      Encapsulating a copy of an object in a value type.

    • D. 

      Encapsulating a value type in an object.

  • 12. 
    Which compiler switch creates an xml file from the xml comments in the files in an assembly?
    • A. 

      /text

    • B. 

      /doc

    • C. 

      /xml

    • D. 

      /help

    • E. 

      /xmlhelp

  • 13. 
    Which common design pattern is shown below? public class A  {     private A instance;     private A() { }     public static A Instance      {       get       {         if(instance == null)           instance = new A();         return instance;       }     } }
    • A. 

      Factory

    • B. 

      Abstract Factory

    • C. 

      Singleton

    • D. 

      Builder

  • 14. 
    Which of the following operations can you NOT perform on an ADO.NET DataSet?
    • A. 

      A DataSet can be synchronized with the database.

    • B. 

      A DataSet can be synchronized with a RecordSet.

    • C. 

      A DataSet can be converted to XML.

    • D. 

      You can infer the schema from a DataSet.

  • 15. 
    In Object Oriented Programming, which answers best describes encapsulation?
    • A. 

      The conversion of one type of object to another.

    • B. 

      The runtime resolution of method calls.

    • C. 

      The exposition of data.

    • D. 

      The separation of interface and implementation.

  • 16. 
    Can you change the value of a variable while debugging a C# application?
    • A. 

      Yes

    • B. 

      No