RT Private WithEvents th点名缓存 As New System.ComponentModel.BackgroundWorker把上面的代码 改成C#的。。我有2个困惑  第一 在C#里没有 WithEvents   第二 在C#里System.ComponentModel名空间下没有BackgroundWorker类高手帮忙。。很急  谢了!

解决方案 »

  1.   

    http://www.developerfusion.com/tools/convert/vb-to-csharp/
    private System.ComponentModel.BackgroundWorker th点名缓存 = new System.ComponentModel.BackgroundWorker(); 
      

  2.   

    恩啊。。我就想把VB.NET转成C#的代码啊。想再请教下,那个WithEvents 关键字不用管吗?
      

  3.   

    网上有VB-C#转换器,但好多不准.
    以前公司用VB.NET...没几天自己就闪了...
      

  4.   

    /*把上面的代码 改成C#的。。我有2个困惑  第一 在C#里没有 WithEvents  第二 在C#里System.ComponentModel名空间下没有BackgroundWorker类高手帮忙。。很急  谢了!*/第二点不对,C#里面有BackgroundWorker的
      

  5.   

    关于时间C#的关键字用event 可以改为 private event  System.ComponentModel.BackgroundWorker th点名缓存
      

  6.   

    恩。呵呵。是的  在C#里我找到 BackGroundWorker这个类了
      

  7.   

    不知是否是你想要的
    private System.ComponentModel.BackgroundWorker backgroundWorker1;
      

  8.   

    google一下
    “vb.net在线转C#”,有很多提供在线转的网站哦
      

  9.   

    private BackgroundWorker th点名缓存 = new BackgroundWorker();  这样WithEvents 是说明你声明了这个类,还可以用这个类的方法。。C#不用,只要声明了这个类后,它的方法你也可以使用;