Dim c As a = New a()
或者
Dim c As New a()
你用的什么版本的VB?语法好怪

解决方案 »

  1.   

    我用的是vbscript 在asp中刚才这个语法 ,我试了下vbscript中报错!
      

  2.   

    好象vbscript没有New操作符吧,用Createobject试一下
      

  3.   

    好象vbscript没有New操作符吧,用Createobject试一下
      

  4.   

    好象vbscript没有New操作符吧,用Createobject试一下
      

  5.   

    createobject 好象不行吧
      

  6.   

    dim a
    set a=server.createobject("projectname.classname")
    首先projectname要编译or 
    set b=a
      

  7.   

    example:
    the class name is class1.cls
    the code is follow:
      private a as integer
      prevate b as integer
      public setval(x as integer,y as integer)
        a=x
        b=y
      end subhere is the call codedim myclass as new class1
    set myclass=new class1
    myclass.setval(3,6)
      

  8.   

    VBScript不支持自定义类
    所以你的语法也不支持
    用VB吧