Char - IsWhiteSpace

Indicates whether the specified Unicode character is categorized as white space.

Try it

public static void Main()
{
    char [] input = {'E','n','t','i','t','y',' ','F','r','a','m','e','w','o','r','k',' ','6','.','2'};

     Console.WriteLine("Is each of the following characters in a white space?");

    for (int i = 0; i < input.Length; i++)
    {
		// C# Extension Method: Char - IsWhiteSpace
		var result = input[i].IsWhiteSpace();
		
        Console.WriteLine("{0} : {1} ", input[i], result);
    }
}

View Source
using System;

public static partial class Extensions
{
    /// <summary>
    ///     Indicates whether the specified Unicode character is categorized as white space.
    /// </summary>
    /// <param name="c">The Unicode character to evaluate.</param>
    /// <returns>true if  is white space; otherwise, false.</returns>
    public static Boolean IsWhiteSpace(this Char c)
    {
        return Char.IsWhiteSpace(c);
    }
}