Count Occurrences of a Character in a String using LINQSShinuraj15yPublished Feb 17, 2011, 12:00 AMUpdated Feb 17, 2011, 5:07 AM15.6k00Reactions×25Blogtry out the below code!Dim testString As String = "this is for testing the linq query." Dim count As Integer = (From s In testString.ToCharArray Where s = "i" Select s).Countthanks-ShinuCommentsJoin the conversation! Your thoughts help the community grow.Sign in to leave a commentIt is the same account you read, post and publish with — and you will come straight back to this page.Sign inCreate an account
Join the conversation! Your thoughts help the community grow.