public string StrReplace(string stri,int asc) { string temp=""; CharEnumerator CEnumerator = stri.GetEnumerator(); while (CEnumerator.MoveNext()) { byte[] array = new byte[1]; array = System.Text.Encoding.ASCII.GetBytes(CEnumerator.Current.ToString()); int asciicode = (short)(array[0]); if (asciicode != asc) { temp += CEnumerator.Current.ToString(); } } return temp; }