using 是做为语句是 引用,换成vb.net的话就是 imports 但如果是放在过程中呢?做为指令来用,指局部引用,如//create & open a SqlConnection, and dispose of it after we are done.
using (SqlConnection cn = new SqlConnection(connectionString))
{
cn.Open(); //call the overload that takes a connection in place of the connection string
return ExecuteDataset(cn, commandType, commandText, commandParameters);
}这种情况下,应该如何转换成vb.net?谢谢了

解决方案 »

  1.   

    http://gzdaily.dayoo.com/gb/content/2006-02/24/content_2417359.htm
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    暂住证每人每证收35元   手机尾号为4051的读者问:请问现在办暂住证要多少钱,麻烦你回答我好吗?因为我这里办暂住证要收63元。   东莞市物价局答复:根据《东莞市出租屋租住人员办理<暂住证>操作办法(试行)》规定,对外来人员的收费共有6项共计69.5元,其中暂住证工本费每证5元,治安联防费每年30元,流动人口婚育证明费每证5元,计划生育服务证费每证1.5元,城市生活垃圾处理费每年12元,绿化费每年16元。   但办理暂住证时只能收取治安联防费和工本费,共计35元,其他针对外来人员的收费不能在办理暂住证时“搭车”收取。 
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    樓主,借地“暫住”一下。
      

  2.   

    网上有一个c#转vb.net代码的工具呀,具体地址我给忘了,你自己google一下了
      

  3.   

    http://weblogs.asp.net/bleroy/archive/2004/07/06/174195.aspx
      

  4.   

    VB 转换到 C#
    http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx
      

  5.   

    c#中的托管
    在using语句中创建一个示例,确保退出using语句时调用dispose
      

  6.   

    using的中括号结束了,using中对象就自动dispose了