Resharper Code Cleanup force string.empty instead of ""
Hi!
Does anyone know if it's possible to force a string.empty on a code cleanup?
So for example when there are statements like this;
string test = "";
It will be replaced by the code cleanup to this;
string test = string.Empty
If anyone knows if this is possible, I would love to know how to set this up.
Thanks,
Wouter
Please sign in to leave a comment.
Hello,
Thank you for contacting us.
There's ReSharper context action "Use string.Empty", but context actions are not applied during code cleanup.
I'd suggest trying ReSharper | Find | Search with Pattern feature. E.g. finding all
and replacing them with
Thank you.