CSharp examples for System:Char
Is Safe char
using System.Text.RegularExpressions; using System.Text; using System.Collections.Generic; using System;// ww w. jav a2s .com public class Main{ #region UrlEncode internal static bool IsSafe(char ch) { if ((((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))) || ((ch >= '0') && (ch <= '9'))) { return true; } switch (ch) { case '\'': case '(': case ')': case '*': case '-': case '.': case '_': case '!': return true; } return false; } }