Declare IEnumerable via string array - CSharp Language Basics

CSharp examples for Language Basics:Array

Description

Declare IEnumerable via string array

Demo Code

using System.Collections.Generic;
using System.ComponentModel;
using static System.Linq.Enumerable;
class UsingStaticExtensionMethods2
{
   static void Main()
   {/*w  ww  .j  a  v a 2 s. co  m*/
      IEnumerable<string> strings = new[] { "a", "b", "c" };
      int valid = strings.Count();
      // int invalid = Count(strings);
   }
}

Related Tutorials