Last Updated: February 25, 2016
·
838
· to_pe

VS 2010 Regex for converting C++ defines to C# constants

When porting C++ code to C#, you might want to convert all string defines to C# public string constants. Here is a convenient regex for it:

Find what:
\#define:b*{:i}:b*{:q}

Replace with:
public const String \1 = \2;