vb数组转。net数组
Dimwa()AsString=WeatherClass.getCityWeather(cityCode.Trim())Label1.Text=wa(10)Label2....
Dim wa() As String = WeatherClass.getCityWeather(cityCode.Trim())
Label1.Text = wa(10)
Label2.Text = wa(6) & " " & wa(5) & " " & wa(7)
Label3.Text = wa(13) & " " & wa(12) & " " & wa(14)
Label4.Text = wa(18) & " " & wa(17) & " " & wa(19)
Label5.Text = wa(11).Replace(Chr(10), "<br />")
Label6.Text = wa(22).Replace(Chr(10), "<br />")
Label7.Text = CType(wa(4), DateTime).ToString("yyyy年MM月dd日 dddd HH:mm")
Label8.Text = wa(0) & " / " & wa(1)
Image1.ImageUrl = "~/images/weather/" & wa(8)
Image2.ImageUrl = "~/images/weather/" & wa(9)
Image3.ImageUrl = "~/images/weather/" & wa(15)
Image4.ImageUrl = "~/images/weather/" & wa(16)
Image5.ImageUrl = "~/images/weather/" & wa(20)
Image6.ImageUrl = "~/images/weather/" & wa(21)
end sub
转C#代码 展开
Label1.Text = wa(10)
Label2.Text = wa(6) & " " & wa(5) & " " & wa(7)
Label3.Text = wa(13) & " " & wa(12) & " " & wa(14)
Label4.Text = wa(18) & " " & wa(17) & " " & wa(19)
Label5.Text = wa(11).Replace(Chr(10), "<br />")
Label6.Text = wa(22).Replace(Chr(10), "<br />")
Label7.Text = CType(wa(4), DateTime).ToString("yyyy年MM月dd日 dddd HH:mm")
Label8.Text = wa(0) & " / " & wa(1)
Image1.ImageUrl = "~/images/weather/" & wa(8)
Image2.ImageUrl = "~/images/weather/" & wa(9)
Image3.ImageUrl = "~/images/weather/" & wa(15)
Image4.ImageUrl = "~/images/weather/" & wa(16)
Image5.ImageUrl = "~/images/weather/" & wa(20)
Image6.ImageUrl = "~/images/weather/" & wa(21)
end sub
转C#代码 展开
展开全部
C#
string[] wa = WeatherClass.getCityWeather(cityCode.Trim());
Label1.Text = wa[10];
Label2.Text = wa[6] + " " + wa[5] + " " + wa[7];
Label3.Text = wa[13] + " " + wa[12] + " " + wa[14];
Label4.Text = wa[18] + " " + wa[17] + " " + wa[19];
Label5.Text = wa[11].Replace(Strings.Chr(10), "<br />");
Label6.Text = wa[22].Replace(Strings.Chr(10), "<br />");
Label7.Text = ((DateTime)wa[4]).ToString("yyyy年MM月dd日 dddd HH:mm");
Label8.Text = wa[0] + " / " + wa[1];
Image1.ImageUrl = "~/images/weather/" + wa[8];
Image2.ImageUrl = "~/images/weather/" + wa[9];
Image3.ImageUrl = "~/images/weather/" + wa[15];
Image4.ImageUrl = "~/images/weather/" + wa[16];
Image5.ImageUrl = "~/images/weather/" + wa[20];
Image6.ImageUrl = "~/images/weather/" + wa[21];
string[] wa = WeatherClass.getCityWeather(cityCode.Trim());
Label1.Text = wa[10];
Label2.Text = wa[6] + " " + wa[5] + " " + wa[7];
Label3.Text = wa[13] + " " + wa[12] + " " + wa[14];
Label4.Text = wa[18] + " " + wa[17] + " " + wa[19];
Label5.Text = wa[11].Replace(Strings.Chr(10), "<br />");
Label6.Text = wa[22].Replace(Strings.Chr(10), "<br />");
Label7.Text = ((DateTime)wa[4]).ToString("yyyy年MM月dd日 dddd HH:mm");
Label8.Text = wa[0] + " / " + wa[1];
Image1.ImageUrl = "~/images/weather/" + wa[8];
Image2.ImageUrl = "~/images/weather/" + wa[9];
Image3.ImageUrl = "~/images/weather/" + wa[15];
Image4.ImageUrl = "~/images/weather/" + wa[16];
Image5.ImageUrl = "~/images/weather/" + wa[20];
Image6.ImageUrl = "~/images/weather/" + wa[21];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询