Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 1.1 KB

File metadata and controls

25 lines (21 loc) · 1.1 KB

Unit 1 (C#) - Lesson 10 Learning Objectives

Goals

  • Use access modifiers to customize fields and methods
  • Override built-in methods such as ToString and Equals
  • Understand equality and sameness in C#

Objectives

  • Explain and properly use the static keyword for fields and methods
  • Explain and properly use the readonly keyword
  • Create constant fields using const
  • Explain why instance variables may not be referenced within static methods
  • Write a custom ToString method for a given class
  • Explain the concepts of object identity and equality, and how they differ
  • Explain and properly use Equals to determine when two objects are equal
  • Explain the behavior of == with respect to objects in C#
  • Describe and implement the best practices for overriding Equals within a class
  • Use the GetType method to determine the class of an object
  • Explain when GetHashCode should be overridden within a class
  • Use Visual Studio code generation tools to generate well-structured Equals and GetHashCode methods