Alex Rivera | Logout

How can I check if a string exists in another string

Asked 2011-05-01T12:27:28.397
57

Hope somebody can help me. I am just learning C# and I have a simple question.

I have a variable and I would like to check if that exists in another string. Something like

if ( test contains "abc" ) {

}

Is there an easy way to do this in C#

c#
Edit
Report

1 Answer

4

Refer This.

String.Contains(...)
answered 2011-05-01T12:30:59.040

Your Answer