c和vb點虐 轉換 vb 轉c#

C語言轉換為VB.NET

Option Explicit On

成都創(chuàng)新互聯(lián)專注于青河企業(yè)網(wǎng)站建設,響應式網(wǎng)站建設,商城網(wǎng)站開發(fā)。青河網(wǎng)站建設公司,為青河等地區(qū)提供建站服務。全流程定制制作,專業(yè)設計,全程項目跟蹤,成都創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務

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代碼轉換成VB.Net,謝謝!

public function Calculate_CRC8(byval crc as uint16,byval n as uint16) as uint16

dim i as uint16

crc=crc xor n

for i=0 to 7

if crc and 1 then

crc=(crc1) xor H8c

else

crc=crc1

end if

next

return crc

end function

C# to vb點虐 代碼轉換

System.Runtime.InteropServices.DllImport("user32.dll") _

Public Shared Function SetWindowLong(hWnd As IntPtr, nIndex As Integer, wndproc As Integer) As Integer

End Function

System.Runtime.InteropServices.DllImport("user32.dll") _

Public Shared Function GetWindowLong(hWnd As IntPtr, nIndex As Integer) As Integer

End Function

Public Const GWL_STYLE As Integer = -16

Public Const WS_DISABLED As Integer = H8000000

Public Shared Sub SetControlEnabled(c As Control, enabled As Boolean)

If enabled Then

SetWindowLong(c.Handle, GWL_STYLE, (Not WS_DISABLED) And GetWindowLong(c.Handle, GWL_STYLE))

Else

SetWindowLong(c.Handle, GWL_STYLE, WS_DISABLED + GetWindowLong(c.Handle, GWL_STYLE))

End If

End Sub

授人以漁:

這個網(wǎng)站超牛逼

分享題目:c和vb點虐 轉換 vb 轉c#
URL地址:http://muchs.cn/article44/ddiieee.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供關鍵詞優(yōu)化品牌網(wǎng)站制作、網(wǎng)站設計公司、移動網(wǎng)站建設、動態(tài)網(wǎng)站搜索引擎優(yōu)化

廣告

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

小程序開發(fā)