1
Vote

Incorrect RegexOptions assignment?

description

I am not sure, but if you take a look at the FindReplaceDialog.cs code on lines 500 and 529 you will see this:
if (chkCompiledF.Checked) // Refers to the "Compiled" option.
    ro |= RegexOptions.Compiled;

if (chkCultureInvariantF.Checked) // Refers to the "CultureInvariant" option.
    ro |= RegexOptions.Compiled; //<---- Change to "RegexOptions.CultureInvariant" instead?
if (chkCompiledR.Checked) // Refers to the "Compiled" option.
    ro |= RegexOptions.Compiled;

if (chkCultureInvariantR.Checked) // Refers to the "CultureInvariant" option.
    ro |= RegexOptions.Compiled; //<---- Change to "RegexOptions.CultureInvariant" instead?
Aren't those two supposed to be set to "RegexOptions.CultureInvariant" instead of "RegexOptions.Compiled"?

//Visual Vincent

comments