c工程转vb.net vb60转net

怎样将以下的C#.net类代码(.cs)转换成vb.net(.vb) public static

Public Shared Function GetAllusers() As MembershipUserCollection

创新互联是工信部颁发资质IDC服务器商,为用户提供优质的眉山联通机房服务

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

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# to vb.net 代码转换

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

授人以渔:

这个网站超牛逼

vb6.0转型vb.net需要多长时间?c大概需要学习多久?

转VB.NET要几个月吧。转C估计够呛,我说的是懂,而不是只会写个简单的输出,要写的简单的输出只要几个小时。。。也行跟天赋直接挂钩.学C要忘记所有的VB呵呵跟练什么武功似的。


分享标题:c工程转vb.net vb60转net
文章网址:http://scjbc.cn/article/doshjco.html

其他资讯