인사를 C#을 사용 오류접근 열거 유형 내가 열거 유형의 문제가 윈폼에
이 같은 일을하고 ....
namspace XXXXXXxx
{
public partial class form1:form
{
////////
and i am checking the listview selected item with enum type by the following code
private void lstviewcategories_SelectedIndexChanged(object sender, EventArgs e)
{
if (lstviewcategories.SelectedItems[0].ToString() == categorytype.type1.ToString())
{
/////
blah blah...
}
}
and at here i am defining enum like this...
public enum categorytype
{
type1 = "ALL",
type2 ="0-500",
type3 ="500-1000" ,
type4 ="1000+ "
}
}
}
나는이 라인 타입 1에 오류가 발생하고있어 = "ALL",톤 * ype2 = "0-500", 타입 3 = "500-1000" * , type4에 = "1000" 암시 적으로 변환 할 수 없습니다라고 입력 문자열이
을 int로 어떻게 데프 내가 할 수있는 열거으로 이러한 이네
이이에 하나 PLS 도움말 ......