private bool IsAlphaNumeric(KeyPressEventArgs e) { CoreApp.clsUtility ObjUtil = new CoreApp.clsUtility(); try { label1.Text = Convert.ToInt32(e.KeyChar).ToString(); if (ObjUtil.IsString(e) == false || ObjUtil.IsNumeric(e) == false) { return(false); } else { return(true); } } catch (Exception) { return(true); } }