重慶分公司,新征程啟航
為企業提供網站建設、域名注冊、服務器等服務
為企業提供網站建設、域名注冊、服務器等服務
這需要三個步驟:
創新互聯公司:公司2013年成立為各行業開拓出企業自己的“網站建設”服務,為成百上千家公司企業提供了專業的成都網站設計、成都網站建設、外貿網站建設、網頁設計和網站推廣服務, 定制設計由設計師親自精心設計,設計的效果完全按照客戶的要求,并適當的提出合理的建議,擁有的視覺效果,策劃師分析客戶的同行競爭對手,根據客戶的實際情況給出合理的網站構架,制作客戶同行業具有領先地位的。
第一步:創建一個C#項目,在其中添加相應的窗體和引用,將VB2008中相應窗體上的控件復制到C#相應的窗體上;
第二步:使用C#與VB.NET轉換工具軟件或者到“”,將VB2008 的代碼轉換成C#代碼。
第三步:工具軟件或者在線轉換,轉換后的代碼會有一些錯誤或者無法轉換的部分,進行簡單的人工修正。
OK,你成功了!
給你個網站看
可在線將vb.net代碼轉成c#的,我用過,還可以的,但是轉后也要改動一些。這里還有將c#轉vb.net的。
這是我轉的:
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;
//確定所要查詢的月的天數
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;
}
public int StrToInt(string str, int moren)
{
int ints = 0;
if (string.IsNullOrEmpty(str) | Information.IsDBNull(str)) {
ints = moren;
} else {
try {
ints = Convert.ToInt32(str);
} catch (Exception ex) {
ints = moren;
}
}
return ints;
}看看這個轉的還可以嗎?