.net中一小段VB代码转换成C#代码的问题
热门软件下载:
imports system.web
imports system.data
imports system.collections
imports microsoft.visualbasic
imports system.data.sqlclient
。
。
。
。
sub drawtitlebar (title as string, location as string)
dim _context as httpcontext = httpcontext.current
with _context.response
.write (" <table cellpadding=""0"" cellspacing=""0"" width=""100%"">")
end with
end sub
主要是httpcontext.current的定义和with方法的使用转换
谢谢
推荐阅读
c# 没有with 用法
dim _context as httpcontext = httpcontext.current
改为httpcontext _context=httpcontext.current;
private void drawtitlebar(string title,string location)
{
httpcontext _context = httpcontext.current;
_context.response.write(" <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">");
}
相关评论