Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Count Occurrences of a Character in a String using LINQ
WhatsApp
Shinuraj
14y
14.7
k
0
0
25
Blog
try 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).Count
thanks
-Shinu
Count Occurrences of a Character in a String using LINQ
Up Next
Convert Datatable to XML String using LINQ
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Membership not found