給你個網(wǎng)站看
10多年的江夏網(wǎng)站建設(shè)經(jīng)驗,針對設(shè)計、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時及時工作處理。成都全網(wǎng)營銷推廣的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整江夏建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計,從而大程度地提升瀏覽體驗。成都創(chuàng)新互聯(lián)從事“江夏網(wǎng)站設(shè)計”,“江夏網(wǎng)站推廣”以來,每個客戶項目都認(rèn)真落實執(zhí)行。
可在線將vb.net代碼轉(zhuǎn)成c#的,我用過,還可以的,但是轉(zhuǎn)后也要改動一些。這里還有將c#轉(zhuǎn)vb.net的。
這是我轉(zhuǎn)的:
string[] ArrValue = new string[43];
int Nums;
public void Page_Load(object Sender, EventArgs E)
{
int I;
if (!IsPostBack) {
for (I = 1900; I = 2101; I++) {
ListItem IItem = new ListItem();
IItem.Text = (string)I;
if (I == Year(Now)) {
IItem.Selected = "True";
}
DropYear.items.add(IItem);
}
for (I = 1; I = 12; I++) {
ListItem IItem = new ListItem();
IItem.Text = (string)I;
if (I == Month(Now)) {
IItem.Selected = "True";
}
DropMonth.items.add(IItem);
}
}
DispDetail(Conversion.Val(DropYear.SelectedItem.Text), Conversion.Val(DropMonth.SelectedItem.Text));
}
public void DispDetail(int YYear, int MMonth)
{
System.DateTime theDate;
int theYear;
int theMonth;
int theDay;
int theWeek;
int theFirstNum;
int NumOfMonth;
int i;
string theStr;
theYear = YYear;
theMonth = MMonth;
theDay = 1;
//獲得所要查詢的月的第一天日期
theDate = DateSerial(theYear, theMonth, theDay);
//確定所要查詢的第一天是星期幾
theWeek = weekday(theDate);
theFirstNum = theWeek;
//確定所要查詢的月的天數(shù)
NumOfMonth = GetDayNum(theyear, themonth);
for (i = 0; i = 41; i++) {
ArrValue(i) = "";
}
for (i = 0; i = NumOfMonth - 1; i++) {
ArrValue(theFirstNum - 1 + i) = i + 1;
}
}
public object GetDayNum(int YYear, int MMonth)
{
object functionReturnValue = null;
if (MMonth == 1 | MMonth == 3 | MMonth == 5 | MMonth == 7 | MMonth == 8 | MMonth == 10 | MMonth == 12) {
functionReturnValue = 31;
}
else {
if (MMonth == 4 | MMonth == 6 | MMonth == 9 | MMonth == 11) {
functionReturnValue = 30;
}
else {
if (((YYear % 4 == 0) (YYear % 100 != 0)) | (YYear % 400 == 0)) {
functionReturnValue = 29;
}
else {
functionReturnValue = 28;
}
}
}
return functionReturnValue;
}
你實例化對象看看哈
VB 和C# 的object 在變異的時候是不一樣的,你不做修改正常出錯
object指對象,代表的是通用的對象,就是什么對象都可以表示,new只能表示固定的對象
還有注意一下大小寫object和Object是不一樣的
可以試試VBto Converter
VBto Converter是一款VB語言轉(zhuǎn)換軟件,它支持將MS Visual Basic資源文件(包括源代碼)轉(zhuǎn)換成MS VC++ MFC, VC++.NET (CLR), VBNET, C#, J#, Borland C++ Builder, Borland Delphi源文件。