成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

c轉(zhuǎn)vb.net項目 vb60轉(zhuǎn)net

C語言轉(zhuǎn)換為VB.NET

Option Explicit On

成都網(wǎng)絡(luò)公司-成都網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)公司十余年經(jīng)驗成就非凡,專業(yè)從事網(wǎng)站設(shè)計制作、做網(wǎng)站,成都網(wǎng)頁設(shè)計,成都網(wǎng)頁制作,軟文平臺廣告投放平臺等。十余年來已成功提供全面的成都網(wǎng)站建設(shè)方案,打造行業(yè)特色的成都網(wǎng)站建設(shè)案例,建站熱線:028-86922220,我們期待您的來電!

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

請幫忙將以下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 y100 Then

y=y+2000

End If

If y1916 OrElse m200 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

Console.WriteLine(" {0}-{1} ~ {2}-{3}",y,m,ye,[Me])

ye=y

[Me]=m

For i=0 To t-1

prmonth(ye,[me])

[Me]=[Me]+1

If [Me]12 Then

ye=ye+1

[me]=1

End If

Next

Return 0

End Function

Function yam(y As Integer,m As Integer) As Integer

Dim st As String()={"未定義","一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"}

Console.WriteLine(" {0} {1}",y,st(m))

Console.WriteLine("----------------------------")

Return 0

End Function

Function ryear(y As Integer) As Integer

If 0=y Mod 400 OrElse (0y Mod 100 AndAlso 0=y Mod 4) Then

Return 1

Else

Return 0

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 Integer=0

If 2=m Then

ad=ryear(y)

End If

Return day(m)+ad

End Function

Function monday(y As Integer,m As Integer) As Integer

Dim md As Integer=6

Dim i,daynum As Integer

For i=1916 To y-1

daynum=365+ryear(i)

md=(md+daynum) Mod 7

Next

For i=1 To m-1

md=(md+mday(y,i)) Mod 7

Next

Return md

End Function

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

If 0=i Mod 7 Then

Console.WriteLine()

Console.WriteLine()

Console.Write(" ")

End If

If i-md=0 Then

Console.Write(" {0,2}",i-md+1)

Else

Console.Write(" ")

End If

Next

Console.WriteLine()

Console.WriteLine()

Return 0

End Function

End Module

怎樣將以下的C#.net類代碼(.cs)轉(zhuǎn)換成vb.net(.vb) public static

Public Shared Function GetAllusers() As MembershipUserCollection

Dim a As Integer = Membership.GetAllUsers().Count

GetAllusers = Membership.GetAllUsers(0, 5, a)

End Function

Public Shared Function GetUser() As MembershipUser

GetUser = Membership.GetUser()

End Function

.net把C#轉(zhuǎn)為VB代碼

我這個就是VB.NET的代碼

Imports System

Imports System.Reflection

Imports System.Runtime.Serialization

Imports System.Runtime.Serialization.Formatters

Imports System.Runtime.Serialization.Formatters.Binary

Imports System.Runtime.CompilerServices

Imports System.Runtime.Remoting

Imports System.Runtime.Remoting.Channels

Imports System.Runtime.Remoting.Channels.Tcp

Imports System.Runtime.Remoting.Messaging

Namespace Learn.Library.Remoting

Public Class RemotingTest ' *'// summary

' '/ 遠(yuǎn)程類型

' '/ /summary

' Public class Data : MarshalByRefObject

' {

' private Integer i

'

' Public Integer I

' {

' get

' {

' Return i

' }

'

' set

' {

' i = value

' }

'

' }

'

' Public void Where()

' {

' Console.WriteLine("{0} in {1}", Me.GetType().Name, AppDomain.CurrentDomain.FriendlyName)

' }

' }

'

' /**'// summary

' '/ 服務(wù)器端代碼

' '/ /summary

' static void Server()

' {

' ' 創(chuàng)建新的應(yīng)用程序域,以便模擬分布系統(tǒng)。

' AppDomain server = AppDomain.CreateDomain("server")

' server.DoCallBack(delegate

' {

' ' 創(chuàng)建并注冊信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

' ' 注冊遠(yuǎn)程對象激活模式

' RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType(Data), "data",

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

' ' 創(chuàng)建并注冊信道

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對象并調(diào)用其方法

' Data data = CType(Activator.GetObject(Type.GetType(Data), "tcp://localhost:801/data"), Data)

' data.Where()

'

' ' 判斷是否是代理

' Console.WriteLine(RemotingServices.IsTransparentProxy(data))

' }

'

' static void Main()

' {

' Server()

' Client()

' }

' }

'

End Class

{ ' *'// summary

' '/ 遠(yuǎn)程類型

' '/ /summary

' Public class Data : MarshalByRefObject

' {

' private Integer i

'

' Public Integer I

' {

' get

' {

' Return i

' }

'

' set

' {

' i = value

' }

'

' }

'

' Public void Where()

' {

' Console.WriteLine("{0} in {1}", Me.GetType().Name, AppDomain.CurrentDomain.FriendlyName)

' }

' }

'

' /**'// summary

' '/ 服務(wù)器端代碼

' '/ /summary

' static void Server()

' {

' ' 創(chuàng)建新的應(yīng)用程序域,以便模擬分布系統(tǒng)。

' AppDomain server = AppDomain.CreateDomain("server")

' server.DoCallBack(delegate

' {

' ' 創(chuàng)建并注冊信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

' ' 注冊遠(yuǎn)程對象激活模式

' RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType(Data), "data",

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

' ' 創(chuàng)建并注冊信道

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對象并調(diào)用其方法

' Data data = CType(Activator.GetObject(Type.GetType(Data), "tcp://localhost:801/data"), Data)

' data.Where()

'

' ' 判斷是否是代理

' Console.WriteLine(RemotingServices.IsTransparentProxy(data))

' }

'

' static void Main()

' {

' Server()

' Client()

' }

' }

'

End Namespace

{

Public Class RemotingTest ' *'// summary

' '/ 遠(yuǎn)程類型

' '/ /summary

' Public class Data : MarshalByRefObject

' {

' private Integer i

'

' Public Integer I

' {

' get

' {

' Return i

' }

'

' set

' {

' i = value

' }

'

' }

'

' Public void Where()

' {

' Console.WriteLine("{0} in {1}", Me.GetType().Name, AppDomain.CurrentDomain.FriendlyName)

' }

' }

'

' /**'// summary

' '/ 服務(wù)器端代碼

' '/ /summary

' static void Server()

' {

' ' 創(chuàng)建新的應(yīng)用程序域,以便模擬分布系統(tǒng)。

' AppDomain server = AppDomain.CreateDomain("server")

' server.DoCallBack(delegate

' {

' ' 創(chuàng)建并注冊信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

' ' 注冊遠(yuǎn)程對象激活模式

' RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType(Data), "data",

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

' ' 創(chuàng)建并注冊信道

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對象并調(diào)用其方法

' Data data = CType(Activator.GetObject(Type.GetType(Data), "tcp://localhost:801/data"), Data)

' data.Where()

'

' ' 判斷是否是代理

' Console.WriteLine(RemotingServices.IsTransparentProxy(data))

' }

'

' static void Main()

' {

' Server()

' Client()

' }

' }

'

End Class

{ ' *'// summary

' '/ 遠(yuǎn)程類型

' '/ /summary

' Public class Data : MarshalByRefObject

' {

' private Integer i

'

' Public Integer I

' {

' get

' {

' Return i

' }

'

' set

' {

' i = value

' }

'

' }

'

' Public void Where()

' {

' Console.WriteLine("{0} in {1}", Me.GetType().Name, AppDomain.CurrentDomain.FriendlyName)

' }

' }

'

' /**'// summary

' '/ 服務(wù)器端代碼

' '/ /summary

' static void Server()

' {

' ' 創(chuàng)建新的應(yīng)用程序域,以便模擬分布系統(tǒng)。

' AppDomain server = AppDomain.CreateDomain("server")

' server.DoCallBack(delegate

' {

' ' 創(chuàng)建并注冊信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

' ' 注冊遠(yuǎn)程對象激活模式

' RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType(Data), "data",

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

' ' 創(chuàng)建并注冊信道

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對象并調(diào)用其方法

' Data data = CType(Activator.GetObject(Type.GetType(Data), "tcp://localhost:801/data"), Data)

' data.Where()

'

' ' 判斷是否是代理

' Console.WriteLine(RemotingServices.IsTransparentProxy(data))

' }

'

' static void Main()

' {

' Server()

' Client()

' }

' }

' }

'

'

'

'

'

網(wǎng)頁名稱:c轉(zhuǎn)vb.net項目 vb60轉(zhuǎn)net
瀏覽地址:http://jinyejixie.com/article46/doohehg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、網(wǎng)站維護(hù)、服務(wù)器托管電子商務(wù)、企業(yè)網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司
固原市| 漾濞| 民乐县| 讷河市| 崇文区| 衡山县| 临猗县| 平阴县| 梅州市| 九江县| 孟州市| 襄汾县| 荔波县| 肇州县| 天镇县| 石屏县| 天长市| 兰州市| 汉寿县| SHOW| 广东省| 包头市| 宁明县| 镇赉县| 永城市| 龙陵县| 蒲城县| 综艺| 兴国县| 九龙县| 南投县| 横山县| 合阳县| 马山县| 沾益县| 泾阳县| 苏尼特右旗| 景谷| 龙门县| 嘉定区| 新营市|