Use LINQ to query characters in a string : select : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » select »

 

Use LINQ to query characters in a string








    
 
using System;
using System.Collections.Generic;
using System.Linq;

static class TestString {
    static void Main() {
        var count =
          "abc 8"
          .Where(c => !Char.IsLetter(c))
          .Count();
        Console.WriteLine(count);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» select