Languages
[Edit]
EN

C# / .NET - string contains

11 points
Created by:
aaliyah
471

In C# / .NET it is possible to check string existence in following ways.

1. String.Contains method example

Edit

Output:

2. String.IndexOf method example

Edit

Output:

3. String.LastIndexOf method example

Edit

Output:

4. Regex.IsMatch method example

Edit

Output:

5. References

Edit
  1. String.Contains Method - Microsoft Docs
  2. String.IndexOf Method - Microsoft Docs
  3. String.LastIndexOf Method - Microsoft Docs
  4. Regex Class - Microsoft Docs
  5. Regex.IsMatch Method - Microsoft Docs
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join