下面的VB语句要转为C#,该怎么弄啊!

来源:百度知道 编辑:UC知道 时间:2024/05/30 22:23:38
Response.write "<v:line id=""msi_1025"" title="""&total(i,j)&unit&"-"&total(i+1,j)&unit&""" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="""&x1&"px,"&y1&"px"" to="""&x2&"px,"&y2&"px"" coordsize=""21600,21600"" strokecolor="""&line_code(j,1)&""" strokeweight="""&line_code(j,2)&""" onmouseover='this.strokeweight=this.strokeweight+1' onmouseout='this.strokeweight=this.strokeweight-1'>"

把&换成+
把Response.write换成Response.Write
加括号Response.Write()和分号【;】

Response.Write("<v:line id=""msi_1025"" title=""" + total(i,j) + unit + "-" + total(i+1,j) + unit + """ style='position:absolute;left:0;text-align:left;top:0;z-index:1' from=""" + x1 + "px," + y1 + "px"" to=""" + x2 + "px," + y2 + "px"" coordsize=""21600,21600"" strokecolor=""" + line_code(j,1) + """ strokeweight=""" + line_code(j,2) + """ onmouseover='this.strokeweight=this.strokeweight+1' onmouseout='this.strokeweight=this.strokeweight-1'>");

有点难

把&换成+就行了。