中文字幕日韩精品一区二区免费_精品一区二区三区国产精品无卡在_国精品无码专区一区二区三区_国产αv三级中文在线

c轉(zhuǎn)vb.net項(xiàng)目 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àn)成就非凡,專業(yè)從事網(wǎng)站設(shè)計(jì)制作、做網(wǎng)站,成都網(wǎng)頁(yè)設(shè)計(jì),成都網(wǎng)頁(yè)制作,軟文平臺(tái),廣告投放平臺(tái)等。十余年來已成功提供全面的成都網(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ù)時(shí)一行一個(gè)

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

請(qǐ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ù)時(shí)一行一個(gè)

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代碼

我這個(gè)就是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)建并注冊(cè)信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

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

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

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

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

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對(duì)象并調(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)建并注冊(cè)信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

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

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

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

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

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對(duì)象并調(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)建并注冊(cè)信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

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

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

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

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

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對(duì)象并調(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)建并注冊(cè)信道

' TcpServerChannel channel = New TcpServerChannel(801)

' ChannelServices.RegisterChannel(channel, False)

'

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

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

' WellKnownObjectMode.Singleton)

'

' }

' )

' }

'

' /**'// summary

' '/ 客戶端代碼

' '/ /summary

' static void Client()

' {

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

' TcpClientChannel channel = New TcpClientChannel()

' ChannelServices.RegisterChannel(channel, False)

'

' ' 創(chuàng)建遠(yuǎn)程對(duì)象并調(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)頁(yè)名稱:c轉(zhuǎn)vb.net項(xiàng)目 vb60轉(zhuǎn)net
瀏覽地址:http://www.rwnh.cn/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)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司
报价| 阜康市| 顺平县| 庆云县| 屏东县| 德令哈市| 衡南县| 合江县| 岳阳市| 双城市| 沙河市| 民权县| 枣阳市| 城固县| 磐安县| 武定县| 合作市| 隆德县| 运城市| 绍兴县| 沂南县| 大冶市| 保定市| 科技| 古蔺县| 睢宁县| 舞阳县| 阳谷县| 济宁市| 樟树市| 苏尼特左旗| 沅江市| 渑池县| 乐亭县| 铁力市| 格尔木市| 安西县| 腾冲县| 和硕县| 铁岭市| 西畴县|