예제 #1
0
        public static Boolean IDVal(string eID)
        {
            if (eID.Length == 3)
            {
                string fID = eID.Substring(0);
                string sID = eID.Substring(1);
                string tID = eID.Substring(2);

                if (IsLetter.IsMatch(fID))
                {
                    if (IsNumber.IsMatch(sID))
                    {
                        if (IsNumber.IsMatch(tID))
                        {
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
        private static bool IsTextAllowed(string text)
        {
            bool answer = !IsNumber.IsMatch(text);

            return(answer);
        }