private void a(int i,out string s)就这样用呀。string str=a(2);

解决方案 »

  1.   

    funcSome(out String str)
    {
    str=new String();
    ……
    str="Text";
    }
    //
    ……
    funcSome(out MyString);
    String s=MyString;
    //s的值是"Text";
      

  2.   

    自己写的确实没问题,但我是调用一个UnManage的DLL——通过[DllImport]导入的——总是提示“Object not refrence”……  另外,UnManage类型的Dll应该还可以通过一些方法(好象是Tlbexp.exe、TlbImp.exe什么的)转为Manage类型的后直接通过Add Refrence调用而不通过[DllImport]吧……哪位知道具体怎么处理。需要的话可以加分。
     谢谢!
      

  3.   

    UnManage类型的Dll应该还可以通过一些方法(好象是Tlbexp.exe、TlbImp.exe什么的)转为Manage类型的后直接通过Add Refrence调用而不通过[DllImport]吧……哪位知道具体怎么处理。