CSharp examples for System:Char
Is Url Safe Char
// Copyright (c) Microsoft Corporation. All rights reserved. using System.Text; using System;//from www .ja v a2 s . c o m public class Main{ // Set of safe chars, from RFC 1738.4 minus '+' public static bool IsUrlSafeChar( 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 ')': return true; } return false; } }