Skip to content

string.Empty as a Const #66300

Answered by teo-tsirpanis
eidylon asked this question in General
Mar 7, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Duplicate of #60508. Quoting myself from there:

I persume you want to add this constant field to completely avoid writing "" in your code, based on the knowledge that magic strings are a bad practice. But the empty string is not a magic string per se, you could view its two consecutive double quotes as a symbol like || or &&.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@eidylon
Comment options

@CyrusNajmabadi
Comment options

Answer selected by danmoseley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment