C# Char IsWhiteSpace(Char)
Description
Char IsWhiteSpace(Char)
indicates whether the specified
Unicode character is categorized as white space.
Syntax
Char.IsWhiteSpace(Char)
has the following syntax.
public static bool IsWhiteSpace(
char c
)
Parameters
Char.IsWhiteSpace(Char)
has the following parameters.
c
- The Unicode character to evaluate.
Returns
Char.IsWhiteSpace(Char)
method returns true if c is white space; otherwise, false.
Example
The following code example demonstrates IsWhiteSpace.
//w w w .j a v a 2s . c om
using System;
public class MainClass {
public static void Main() {
string str = "black matter";
Console.WriteLine(Char.IsWhiteSpace('A')); // Output: "False"
}
}
The code above generates the following result.