Nerd For Tech
Published in

Nerd For Tech

The Empty String in C#

I recently posed the following question to my team:

Which representation of the empty string do we prefer for our project?:

A) ""

B) string.Empty

I brought this question up because we decided to use StyleCop Analyzers, which has a rule encouraging developers to prefer string.Empty over "". But rather than just blindly following what the linter…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store