为VB.NET Developer学习c# [英] Learning c# for VB.NET Developer

查看:70
本文介绍了为VB.NET Developer学习c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用VB进行.net开发方面经验丰富。是否有任何材料

面向知道.NET和VB.NET的人学习C#?


谢谢,

Gary

解决方案

我认为一本书在21天内自学C#会这样做;)

否则在SDK''c doc中,有C#规范,教程,

文档:

ms-help: //MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csref/html/vcoriCSharpTutorials.htm


" GaryB" < gb@nospam.com>在留言中写道

新闻:Oi ************** @ TK2MSFTNGP10.phx.gbl ...

我很有经验。使用VB进行网络开发。是否有任何材料可供面向知道.NET和VB.NET学习C#的人使用?

感谢,
Gary


或者,如果链接不起作用,请打开.NET SDK帮助,并在

搜索文本框中输入:

C#教程


有一个类似的条目!


" GaryB" < gb@nospam.com>在留言中写道

新闻:Oi ************** @ TK2MSFTNGP10.phx.gbl ...

我很有经验。使用VB进行网络开发。是否有任何材料可供面向知道.NET和VB.NET学习C#的人使用?

感谢,
Gary


将VB.NET转换为C#并不难。大多数.NET编码都使用

框架,这两种语言都是一样的。刚刚阅读了一些关于

C#语法的基础知识。拿一些简单的VB代码,尝试将其修改为C#,看看它是否编译了b $ b。这是我在VB中重写的一个小课程,它显示了几种

语言功能。


公共类WorkerBee

{

public delegate void UpdateGui(string [] ar);

公共事件UpdateGui guiFunc = null;


private Thread thd = null;


public volatile bool bStopNow = false;


public WorkerBee(UpdateGui gptr)

{

guiFunc = gptr;

thd = new Thread(新的ThreadStart(工作));


}

public void Run()

{

thd.Start();

}

private void work()

{

Debug.WriteLine(string.Format(" work()thd =

{0}",Thread.CurrentThread.GetHashCode ());

int k = 0;

string [] sa = new string [10];

for(k = 0 ; k <10000; k ++)

{

if((k%10)== 0&& k> 0)

{

if(bStopNow)break;

if(guiFunc != null)

{

guiFunc(sa);

}

}

sa [k%10] = string.Format(" string:{0}",k);

}

guiFunc(sa);

sa [0] =" 101";

guiFunc(sa);

}

}

Imports System.Threading

公共类WorkerBee


Public Delegate Sub UpdateGui(ByVal ar()As String)

公共事件guiFunc作为UpdateGui


私人作为线程


Dim bStopNow As Boolean = False


Public Sub WorkerBee(ByVal gptr As UpdateGui)


AddHandler guiFunc,gptr

thd =新主题(新主题开始(地址工作))


结束子

Public Sub Run()


thd.Start()

结束子

私人子工作()


Debug.WriteLine(String.Format(" work()thd = {0}",br />
Thread.CurrentThread.GetHashCode()))

Dim k As Int32 = 0

Dim sa(10)As String

如果k = 0到100000

if((k%10)== 0&& k> 0)然后


如果(bStopNow)然后退出


RaiseEvent guiFunc(sa)

结束如果

sa(k Mod 10)= String.Format(" string:{0}",k)

RaiseEvent guiFunc(sa)

sa(0)=" 101"

RaiseEvent guiFunc(sa)

下一页

结束子

结束课

祝你好运,

kevin aubuchon

" GaryB" < gb@nospam.com>在留言中写道

新闻:Oi ************** @ TK2MSFTNGP10.phx.gbl ...

我很有经验。使用VB进行网络开发。是否有任何材料可供面向知道.NET和VB.NET学习C#的人使用?

感谢,
Gary


I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary

解决方案

I think a book kind of "Teach yourself C# in 21 days" will do ;)
Otherwise in the SDK''c doc, there are C# specification, tutorial,
documentation:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csref/html/vcoriCSharpTutorials.htm


"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...

I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary



alternatively, if the links doesn''t work, open .NET SDK help, and in the
search text box type:
"C# tutorial"

there is an entry called like that!

"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...

I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary



It''s not hard to convert VB.NET to C#. Most of .NET coding is using the
Framework, which is the same for both languages. Just read some basics about
C# syntax. Take some easy VB code, try and modify it to C# and see if it
compiles. Here is a little class I just rewrote in VB that show several
language features.

public class WorkerBee
{
public delegate void UpdateGui(string[] ar);
public event UpdateGui guiFunc = null;

private Thread thd = null;

public volatile bool bStopNow = false;

public WorkerBee(UpdateGui gptr)
{
guiFunc = gptr;
thd = new Thread (new ThreadStart (work));

}
public void Run()
{
thd.Start ();
}
private void work()
{
Debug.WriteLine (string.Format ("work() thd =
{0}",Thread.CurrentThread.GetHashCode()));
int k =0;
string [] sa = new string[10];
for (k = 0; k < 10000; k++)
{
if ((k % 10) == 0 && k > 0)
{
if (bStopNow) break;
if (guiFunc != null)
{
guiFunc(sa);
}
}
sa[k % 10] = string.Format ("string:{0}",k);
}
guiFunc(sa);
sa[0] = "101";
guiFunc(sa);
}
}
Imports System.Threading
Public Class WorkerBee

Public Delegate Sub UpdateGui(ByVal ar() As String)
Public Event guiFunc As UpdateGui

Private thd As Thread

Dim bStopNow As Boolean = False

Public Sub WorkerBee(ByVal gptr As UpdateGui)

AddHandler guiFunc, gptr
thd = New Thread(New ThreadStart(AddressOf work))

End Sub
Public Sub Run()

thd.Start()
End Sub
Private Sub work()

Debug.WriteLine(String.Format("work() thd = {0}",
Thread.CurrentThread.GetHashCode()))
Dim k As Int32 = 0
Dim sa(10) As String
For k = 0 To 100000
if ((k % 10) == 0 && k > 0) then

If (bStopNow) Then Exit For

RaiseEvent guiFunc(sa)
End If
sa(k Mod 10) = String.Format("string:{0}", k)
RaiseEvent guiFunc(sa)
sa(0) = "101"
RaiseEvent guiFunc(sa)
Next
End Sub
End Class
good luck,
kevin aubuchon
"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...

I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary



这篇关于为VB.NET Developer学习c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆