private void btnUniq_Click(object sender, EventArgs e) { lstUniq.Items.Clear(); string fldNm = lstFields.SelectedItem.ToString(); fldNm = fldNm.TrimStart(new char[] { pr }); fldNm = fldNm.TrimEnd(new char[] { sf }); int fldIndex = flds.FindField(fldNm); if (fldIndex > -1) { IField fld = flds.get_Field(fldIndex); string p = ""; string s = ""; if (fld.Type == esriFieldType.esriFieldTypeString) { p = "'"; s = "'"; } HashSet <string> hash = geoUtil.getUniqueValues(tbl, fldNm); foreach (string hs in hash) { lstUniq.Items.Add(p + hs + s); } } }