FlashKeepers

C# · College · College and University

C# II: Classes, Interfaces and OOP

C# classes, properties, records, structs, inheritance, interfaces, generics, delegates and events.

About this set

40 basic cards for College C#. It opens with "What keyword defines a reference type that groups data and methods together?" and "What is an abstract class?". Study it alongside the other College sets below.

40 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What keyword defines a reference type that groups data and methods together?
Show answerclass
What is an abstract class?
Show answerA class that cannot be instantiated and is designed to be inherited from
What keyword prevents a class from being inherited?
Show answersealed
What is an abstract method?
Show answerA method with no implementation that derived classes must override
Can a class inherit from a struct in C#?
Show answerNo, a class cannot inherit from a value type
What is an auto-property in C#?
Show answerA property where the compiler automatically creates a hidden backing field
What syntax defines an auto-property with both get and set?
Show answer`public string Name { get; set; }`
What is an init accessor on a property?
Show answerA property accessor that allows assignment only during object initialization
How do you create a read-only property in C#?
Show answerDefine a property with only a get accessor and no set accessor
What is a backing field?
Show answerThe private field that stores the actual value for a property
What is a record in C#?
Show answerA reference type designed for holding data with built-in support for immutability and value-based equality
What keyword creates an immutable record property?
Show answerinit
What is the primary difference between a record and a class?
Show answerRecords have value-based equality by default; classes have reference-based equality
What keyword declares a value type allocated on the stack?
Show answerstruct
Where are structs typically allocated in memory?
Show answerOn the stack (for local variables) or inline within other types

25 more cards in the app

Study this set free