Regex.IsMatch vs string.Contains

Posted by Pradeep on Stack Overflow See other posts from Stack Overflow or by Pradeep
Published on 2010-06-03T00:51:19Z Indexed on 2010/06/03 0:54 UTC
Read the original article Hit count: 212

Filed under:
|

Is there any difference in speed/memory usage for these two equivalent expressions:

Regex.IsMatch(Message, "1000")

Vs

Message.Contains("1000")

Any situations where one is better than other ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET