网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

c和vb点虐 转换 vb 转c#

C语言转换为VB.NET

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

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

授人以渔:

这个网站超牛逼


分享题目:c和vb点虐 转换 vb 转c#
当前路径:http://bjjierui.cn/article/ddiieee.html

其他资讯