资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

vb.net工程转c vb60转net

怎样将VB代码换成C

可以试试VBto Converter

10年积累的成都做网站、网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先做网站后付款的网站建设流程,更有改则免费网站建设让你可以放心的选择与我们合作。

VBto Converter是一款VB语言转换软件,它支持将MS Visual Basic资源文件(包括源代码)转换成MS VC++ MFC, VC++.NET (CLR), VBNET, C#, J#, Borland C++ Builder, Borland Delphi源文件。

vb.net 转 c#

--VB--

Public Function ff() As Boolean

ff=true

End Function

--C#

public bool ff()

{

return true;

}

----

这里的 ff=true 是相当于 C#里的 return true; 是给vb函数自身返回值用的.

--VB--

Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

ff=true 'vb里可以省略函数的小括号()

End Sub

--C#--

private void Form_Load(System.Object sender, System.EventArgs e)

{

ff() == true;

}

这里的 ff=true 是相当于 C#里的 ff() == true; 是判断.

VB.NET object 转换到C#object问题

你实例化对象看看哈

VB 和C# 的object 在变异的时候是不一样的,你不做修改正常出错

object指对象,代表的是通用的对象,就是什么对象都可以表示,new只能表示固定的对象

还有注意一下大小写object和Object是不一样的

如何把下面用vb.net语言编写的代码改成c#

给你个网站看

可在线将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;

}

vb开发的项目用什么工具能直接转成C#的项目呢?

是vb还是vb.net?

如果是vb.net的话,有不少工具可以转!~

如果是vb,那就只能慢慢写了!~


当前文章:vb.net工程转c vb60转net
链接分享:http://cdkjz.cn/article/hjeghc.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220