I have this code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace RegexTest
{
class Program
{
static void Main(string[] args)
{
string str = "The quick brown fox.";
string pat = "fox";
Regex rgx = new Regex(pat, RegexOptions.IgnoreCase);
Match matches = rgx.Match(str);
Console.ReadKey();
}
}
}
It compiles and runs without errors.
I have a breakpoint set at Console.ReadKey(), because I wanted to inspect the variable matches.
But I got the strange error message I put in the title of this thread.
The web wasn't clear about what it meant.
So any help is as always greatly appreciated.