Search⌘ K
AI Features

Quiz Yourself: Classes and OOP

Assess your understanding of C# classes and object-oriented programming.

We'll cover the following...
Technical Quiz
1.

Why is the static keyword prohibited when declaring a const field?

A.

Constants are instance-level members by default and require an object to be accessed.

B.

The static keyword would conflict with the thread-local storage of constant values.

C.

Constants are implicitly static because they are tied to the type metadata, not an instance.

D.

Using static would allow the constant to be modified via the class name at runtime.


1 / 14
...