I am looking for a regualr expression to find in VS2010 solution files for string.empty and replace with string.IsNullOrEmpty
for ex if (strText != string.Empty) to string.IsNullOrEmpty(strText)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In VS2012 this has become a lot easier, since the Regex language used was improved quite a bit:
Search:
Replace:
The overall idea is the same for Visual Studio 2010:
Search:
Replace:
And as others have noted, be sure to have either unit tests to verify you didn’t break anything, or check each replacement to be sure.