How select a name contains the second letter is "s" using LINQ? -


enter image description here

how select name database contains second letter "s" using linq ?

using lambda expressions:

      var str = new string[] { "tsr", "mrg", "d" };       var result = str.where(s => s.length>1 && s[1] == 's'); 

the result variable contain "tsr" value, , checking word have @ least 2 characters otherwise exception thrown


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -