CSharp examples for System:Hex
Is Hex Color String
using System.Text.RegularExpressions; using System.Net.Mail; using System.Linq; using System.Drawing; using System.Collections.Specialized; using System.Collections.Generic; using System.Collections; using System;// ww w . jav a2 s .c om public class Main{ public static bool IsHexColorString(this string s) { return Regex.IsMatch(s, @"^\#?[0-9A-Fa-f]{6}$"); } }