C# Phone Screen Questions [Test your C# skills]

Lets Play 20 quick C# questions which generally asked in most of the companies for screening candidates in first round of interview. Lets see how much you are aware of C#. Go through each questions and try to find answers yourself and match your answer with the correct answers given at the end of the post.
  1. kind of type is a string?
  2. kind of type is a double?
  3. keyword defines a custom value type?
  4. Can a class have more than one direct base class?
  5. keyword makes a member visible to inherited classes?
  6. keyword makes a class visible only within its assembly?
  7. keyword allows a method to be overridden?
  8. keyword requires a method to be overridden?
  9. keyword prevents a class from being used as a base class?
  10. keyword returns true if a cast will succeed?
  11. keyword returns null if a cast will not succeed?
  12. keyword ensures code execution even if an exception occurs?
  13. keyword calls IDisposable.Dispose?
  14. keyword constrains a generic type argument to derive from a particular class?
  15. two keywords used together return IEnumerable?
  16. keyword would you use to define an inline variable in a LINQ query?
  17. keyword brings an extension method into scope?
  18. keyword do you add to a delegate to force subscribers to use += or –=?
  19. method do you call on a delegate to run it on a background thread?
  20. keyword provides thread synchronization?

Answers to questions

  1. reference
  2. value
  3. struct
  4. no
  5. protected
  6. internal
  7. virtual
  8. abstract
  9. sealed
  10. is
  11. as
  12. finally
  13. using
  14. where
  15. yield return
  16. let
  17. using
  18. event
  19. BeginInvoke
  20. lock
* Thanks to Tony Sneed for providing such nice questions.

Comments