1。各位现在用的.net 是1.1  还是2.0    [我用的1.1   2.0似乎还在测试]
2。.net 有没有IDE编辑器   类似VB6那样的最好   我非常喜欢vb6的.帮助
3。  String  转换为 Integer   总是有问题  
[原贴http://community.csdn.net/Expert/topic/3620/3620066.xml?temp=.8496973]     dim a As String  
     dim b As Integer 
   
以下方法都不成功
b=cint(a)     
    Exception Details: System.FormatException: Input string was not in a correct format.b=a.toint16()     
    Compiler Error Message: BC30456: 'ToInt16' is not a member of 'String'
b = Convert.ToInt16(a)
    
    回答的时候请标记 1 2 3

解决方案 »

  1.   

    1. 1.1.4
    2. .NET有集成开发环境,包含c#,vb.net,J#等语言的开发环境
    3. 如果是string 转int
    try
      if isnumeric(a) =false then
         throw new exception("a无法转换为整形值")
      end if  b=cint(a)
    catchend try
      

  2.   

    1. .NetFrameWork1.1 
    2. Visual studio .net 2003 大多数都用这个
    3.  b=cint(a)    如果a要是有字母或小数点等其他特殊字符 就会Input string was not in a correct format.
      

  3.   

    1 net 1.1
    2 net也有帮助,MSDN
    3 你输入的字符串是什么,空格或者字符当然行了
      

  4.   

    1. .NetFrameWork1.1 
    2. Visual studio .net,msdn的帮助很全的。
    3. b=cint(a)不是数字你去转换当然会错了.
      

  5.   

    12 问题 over关于3
    a  肯定是数字
      

  6.   

    刚才说错了因为
    dim a As String  
    dim b As Integer 所以要把a的内容 交给b   要怎么做呢?   例如a="123456"
      

  7.   

    C#中有Convert.ToInt32();
    vb中如何就没有试过了。