public bool f4a1(char s, TipCaracter t) { if ((int)(t) == 1) { if (!Char.IsLetter(s)) { return(false); } } if ((int)(t) == 2) { if (!Char.IsNumber(s)) { return(false); } } if ((int)(t) == 4) { if (!Char.IsPunctuation(s)) { return(false); } } return(true); }
public bool f4a2(char s, TipCaracter[] t) { bool b=false; for(int i=0;i<t.Length;i++) if(f4a1(s,t[i])) { b=true; break; } return b; }
public bool f4a1(char s, TipCaracter t) { if((int)(t)==1) if(!Char.IsLetter(s)) return false; if((int)(t)==2) if(!Char.IsNumber(s)) return false; if((int)(t)==4) if(!Char.IsPunctuation(s)) return false; return true; }
public bool f4(String s, TipCaracter[] t) { for (int i = 0; i < s.Length; i++) if (!f4a2(s[i], t)) return false; return true; }