当然可以,
string a = "1";
int b = (int)a;
int c = Convert.toInt32(a);

解决方案 »

  1.   

    char MyChar = 'X';
    int MyInt=(int)MyChar;
    or
    char MyChar = 'X';
    int MyInt=Convert.ToInt16(MyChar);
      

  2.   

    public static bool IsInteger(string strTest) 

    double dblNum = 0.0; 
    bool bolIsNumeric = false; 
    try 

    dblNum = Convert.ToDouble(strTest); 
    bolIsNumeric = true; 

    catch 

    bolIsNumeric = false; 

    double dblResidue = 0.0; 
    if (bolIsNumeric == true) 

    dblResidue = dblNum % 1; 
    if (dblResidue != 0) 

    return false; 

    else 

    return true; 


    else 

    return false; 

    } 上面一个判断字符串是否为数字的方法。该成你的那个不难呀。
    其实核心就是Convert.ToDouble()函数。注意做异常处理。如果你想把"a"转成数字是不可能的。
      

  3.   

    不行呀,INT转换成string后,数据为0