Is there any difference when declaring a variable of using const vs immutable.
Example:
const int a = 3;
immutable int b = 4;
const string c = "Greetings!";
immutable string d = "D Programmers!";
October 17 const vs immutable - when declaring a variable | ||||
|---|---|---|---|---|
| ||||
Is there any difference when declaring a variable of using const vs immutable. Example:
| ||||
October 18 Re: const vs immutable - when declaring a variable | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Brother Bill | On Friday, 17 October 2025 at 19:49:07 UTC, Brother Bill wrote: >Is there any difference when declaring a variable of using const vs immutable. Example:
Yes, a While this is somewhat of an obvious explanation, the differences are subtle.
My recommendation is to use -Steve | |||