regular expressions - "this expression causes side effects and will not be be evaluated"

J

joyce

hi group,

When I was trying to do a match on
Regex.isMatch("$test",@"^\$")

this seems to return "this expression causes side effects and will not
be be evaluated", any ideas what I'm doing wrong?

thanks,
Joyce
 
B

Ben Voigt [C++ MVP]

joyce said:
hi group,

When I was trying to do a match on
Regex.isMatch("$test",@"^\$")

this seems to return "this expression causes side effects and will not
be be evaluated", any ideas what I'm doing wrong?

Did you use the return value? As in

if (Regex.IsMatch(...)) ...
 
K

Kevin Spencer

Do you mean that you saw this message in a Debug Window? Side effects in a
debugger can be caused by evaluating a method or function call.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top