skip to main | skip to sidebar

ASP.NET Tips

Monday, September 30, 2019

Check if string contains any matches in a string array


Check if string contains any matches in a string array

string med="TESTSTRIPS, LANCETS, ETOH SWABS #100";
string[] items = { "TESTSTRIPS", "GLUCOMET" };
 bool isneed_referal = items.Any(c => med.Contains(c));
Posted by ASP.NET tips at 1:08 PM No comments:
Labels: asp.net, C#, contains, string, stringarray
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)


Cảm ơn đời mỗi sớm mai thức dậy
Ta có thêm ngày nữa để yêu thương


KAHLIL GIBRAN (1883-1931)


Blog Archive

  • ►  2024 (1)
    • ►  March (1)
  • ►  2023 (2)
    • ►  July (1)
    • ►  June (1)
  • ►  2020 (1)
    • ►  December (1)
  • ▼  2019 (2)
    • ▼  September (1)
      • Check if string contains any matches in a string a...
    • ►  July (1)
  • ►  2017 (2)
    • ►  May (1)
    • ►  February (1)
  • ►  2015 (2)
    • ►  September (1)
    • ►  January (1)
  • ►  2014 (2)
    • ►  October (1)
    • ►  July (1)
  • ►  2013 (2)
    • ►  July (1)
    • ►  January (1)
  • ►  2012 (5)
    • ►  December (1)
    • ►  October (1)
    • ►  July (1)
    • ►  May (1)
    • ►  March (1)
  • ►  2011 (9)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  August (1)
    • ►  June (1)
    • ►  May (1)
    • ►  April (3)

About Me

My photo
ASP.NET tips
View my complete profile
 

Search This Blog