Find all source hardcoded strings

后端 未结 6 1147
夕颜
夕颜 2020-12-04 13:51

I need to move all the hard coded strings in my source code in .resx files. Is there a tool that could help me find all the hardcoded strings within C# code?

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 14:31

    Or do a search based upon a regular expression like discussed here:

    https://vosseburchttechblog.azurewebsites.net/index.php/2014/12/16/find-all-string-literals-in-c-code-files-but-not-the-ones-in-comments/

    (?=(^((?!///).)*$)).*((".+?")|('.+?')).*
    

提交回复
热议问题