C# - Determines whether the character is printable

By , 9/16/2008
(1 ratings)
Determines whether the character is printable
/// <summary>
/// Determines whether [is printable character] [the specified candidate].
/// </summary>
/// <param name="candidate">The candidate.</param>
/// <returns>
/// 	<c>true</c> if [is printable character] [the specified candidate]; otherwise, <c>false</c>.
/// </returns>
private bool IsPrintableCharacter(char candidate)
{
    return !(candidate < 0x20 || candidate > 127);
}
Tagged with char, printable.

Comments

 

Log in, to comment!