Multiple choice technology web technology

Is Read Only and Constant variables are same in c#?

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In C#, const fields are compile-time constants that must be initialized at declaration and cannot change. readonly fields can only be assigned at declaration or in a constructor, but their values can vary between instances. They serve different purposes.