新聞中心
vb.net中的數(shù)據(jù)強制轉(zhuǎn)化問題,誰幫我把這段C#轉(zhuǎn)化為VB.net的語言
強制類型轉(zhuǎn)換在VB.NET中用Ctype()函數(shù)實現(xiàn)的。
為德興等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計制作服務(wù),及德興網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為成都網(wǎng)站制作、成都網(wǎng)站設(shè)計、德興網(wǎng)站設(shè)計,以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達到每一位用戶的要求,就會得到認可,從而選擇與我們長期合作。這樣,我們也可以走得更遠!
Dim drv As DataRowView = CType(comboBox1.SelectedItem, DataRowView)
另外:comboBox1.SelectedItem 不是 string 類型,而是 object 類型。ComboBox 下拉顯示文字是通過調(diào)用 Object.ToString() 方法實現(xiàn)的。
如何將C#語言轉(zhuǎn)換為VB.net語言?
暈,我下過這么個軟件,就是從C#轉(zhuǎn)換成VB.NET
不過
我找到了一個網(wǎng)址
打開就可以了
在線翻譯
C語言轉(zhuǎn)換為VB.NET
Option Explicit On
Option Strict On
Imports System
Module Program
Sub Main()
Dim y,m,t As Integer
begin:
' 輸入數(shù)據(jù)時一行一個
y=CInt(Console.ReadLine())
m=CInt(Console.ReadLine())
t=CInt(Console.ReadLine())
If y
200 Then
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
ye=CInt((m+t-2)/12+y)
[Me]=(m+t-2) Mod 12+1
End If
End Function
Function mday(y As Integer,m As Integer) As Integer
Dim day As Integer()={0,31,28,31,30,31,30,31,31,30,31,30,31}
Dim ad As I
當(dāng)前文章:c轉(zhuǎn)vb.net在線 VBNET教程
當(dāng)前URL:http://www.ef60e0e.cn/article/docchep.html