Test Your Knowledge: Quiz

Question 7-1. What is the difference between a class and an object?

Question 7-2. What does the keyword private do?

Question 7-3. What does the keyword public do?

Question 7-4. What method is called when you create an object?

Question 7-5. What is a default constructor?

Question 7-6. What types can a constructor return?

Question 7-7. How do you initialize the value of a member variable in a class?

Question 7-8. What does the keyword this refer to?

Question 7-9. What is the difference between a static method and an instance method?

Question 7-10. Where are reference types created? Where are value types created?

Get Learning C# 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.