转VB.NET要几个月吧.转C估计够呛,我说的是懂,而不是只会写个简单的输出,要写的简单的输出只要几个小时...也行跟天赋直接挂钩.学C要忘记所有的VB呵呵跟练什么武功似的.
强制类型转换在VB.NET中用Ctype()函数实现的.
Dim drv As DataRowView = CType(comboBox1.SelectedItem, DataRowView)
另外:comboBox1.SelectedItem 不是 string 类型,而是 object 类型.ComboBox 下拉显示文字是通过调用 Object.ToString() 方法实现的.
Option Explicit On
Option Strict On
Imports System
Module Program
Sub Main()
Dim y,m,t As Integer
begin:
' 输入数据时一行一个
y=CInt(Console.ReadLine())
m=CInt(Console.ReadLine())
t=CInt(Console.ReadLine())
If y
Console.WriteLine("ERROR")
goto begin
End If
pr(y,m,t)
Console.Write("Press any key to continue . . . ")
Console.ReadKey(True)
End Sub
Function pr(y As Integer,m As Integer,t As Integer) As Integer
Dim ye,[Me],i As Integer
End Function
Function mday(y As Integer,m As Integer) As Integer
Dim ad As I
这需要三个步骤:
第三步:工具软件或者在线转换,转换后的代码会有一些错误或者无法转换的部分,进行简单的人工修正.
OK,你成功了!
' 输入数据时一行一个
If y100 Then
ye=y
[Me]=m
For i=0 To t-1
prmonth(ye,[me])
[Me]=[Me]+1
ye=ye+1
[me]=1
Next
Return 0
Function yam(y As Integer,m As Integer) As Integer
Dim st As String()={"未定义","一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"}
Console.WriteLine(" {0} {1}",y,st(m))
Console.WriteLine("----------------------------")
Function ryear(y As Integer) As Integer
Return 1
Else
Dim ad As Integer=0
ad=ryear(y)
Return day(m)+ad
Function monday(y As Integer,m As Integer) As Integer
Dim i,daynum As Integer
For i=1 To m-1
Return md
Function prmonth(y As Integer,m As Integer) As Integer
Dim md As Integer=monday(y,m)
Dim daysnum As Integer=mday(y,m)
Dim days As Integer=daysnum+md
Dim i As Integer
yam(y,m)
Console.Write(" 日 一 二 三 四 五 六")
For i=0 To days-1
Console.WriteLine()
Console.Write(" ")
If i-md=0 Then
End Module
以上就是土嘎嘎小编为大家整理的c项目转vb.net相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!