十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
可以试试VBto Converter
创新互联公司是一家专业提供新疆企业网站建设,专注与网站设计、成都网站建设、H5开发、小程序制作等业务。10年已为新疆众多企业、政府机构等服务。创新互联专业网站建设公司优惠进行中。
VBto Converter是一款VB语言转换软件,它支持将MS Visual Basic资源文件(包括源代码)转换成MS VC++ MFC, VC++.NET (CLR), VBNET, C#, J#, Borland C++ Builder, Borland Delphi源文件。
给你个网站看
可在线将vb点虐 代码转成c#的,我用过,还可以的,但是转后也要改动一些。这里还有将c#转vb点虐 的。
这是我转的:
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;
}
直接用Replace语句把:
Dim oldstr,newstr as string
oldstr="abcdeftgd"
newstr=replace(oldstr,"a","b")
newstr=replace(newstr,"c","d")
望采纳。
------------------------------------------00000000000000000000000000++++++++++++++++++