Compiler error when trying to use System.Text.RegularExpressions
I have written the folowing small program in C#:
using System;
using System.Text.RegularExpressions;
class regxtester {
static void Main ()
{
Console.WriteLine("Hello");
}
}
When i try to compile it I get a compiler error called "CS0234: The type or
namespace name 'RegularExpressions' does not exist in the class or namespace
'System.Text'.
What can I bed doing wrong
# 1 Re: Compiler error when trying to use System.Text.RegularExpressions
You need reference the System.Text.RegularExpressions.dll when compiling.
So, use:
csc /out:..\bin\test.dll /t:library /r:System.Text.RegularExpressions.dll
test.cs
Hope this helps
Bob Lair
"Alex Lehmberg" <alex.lehmberg@vip.cybercity.dk> wrote in message
news:39a90311$1@news.dev-archive.com...
> I have written the folowing small program in C#:
>
> using System;
> using System.Text.RegularExpressions;
> class regxtester {
> static void Main ()
> {
> Console.WriteLine("Hello");
> }
> }
>
> When i try to compile it I get a compiler error called "CS0234: The type
or
> namespace name 'RegularExpressions' does not exist in the class or
namespace
> 'System.Text'.
>
> What can I bed doing wrong
>
>