
I'm happy to explain how I wrote DumpEnum and I'll even give you the code. In the process I'll answer the second question, too. But first let me explain for other readers just what DumpEnum does. One of the things I had to do in my April 2005 article was write a C++ enum to exactly match the .NET Framework type RegexOptions. RegexOptions is an enumerated (enum) type you can use with methods like Regex::Match and Replace to control matching. For example, you can call Regex::Match with RegexOptions::IgnoreCase to ignore case or RegexOptions::Singleline in order to treat the input string as one line. Figure 1 shows the values in RegexOptions.
|