string.Empty as a Const #66300
-
I'm curious if there is a specific reason, or not, as to why It's always kind of bugged me that I when defining a function with optional parameters, I can't do
as it then yells at me that "optional parameter defaults must be compile-time constants". |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Moving discussion. Nothing in C# dictates this afaict. It's just a decision of a particular release of the runtime. |
Beta Was this translation helpful? Give feedback.
-
Duplicate of #60508. Quoting myself from there:
|
Beta Was this translation helpful? Give feedback.
Duplicate of #60508. Quoting myself from there: