从VB.NET转换为C# - 什么建议吗? [英] Switching from VB.NET to C# - any advice?
问题描述
我主要使用VB.NET,但由于种种原因,我切换到C#。
I've primarily used VB.NET, but for a variety of reasons I'm switching to C#.
(我的有无的用C#之前,但并不广泛。)
(I have used C# before, but not extensively.)
我使用ReSharper的,希望能够使它不那么痛苦了,我想知道如果任何人有学习C#语法建议。其他相关的建议将是巨大的,太。
I'm using ReSharper to hopefully make it less painful, and I'm wondering if anyone has advice for learning C# syntax. Any other relevant advice would be great, too.
推荐答案
随着ReSharper的的帮助和Visual Studio中的开关不宜过难。我来回切换了几次,我尝试做C#上做了做VB队C#和VB队
With the help of Resharper and visual studio the switch shouldn't be too difficult. I switched back and forth a few times, I try to do C# on teams that do C# and VB on teams that do VB.
我发现的三大问题是:
The three biggest problems I found were:
分号,你总是忘记那些当你开始做VB做后,C#。 ReSharper的帮助那里。
Semicolons, you always forget those when you start doing C# after doing VB. Resharper will help there.
关键字和其翻译成C#是很难得到正确的在第一。共享=静态,我=这个,为MustInherit =抽象。等我发现了一个列表在这里,你可以打印出来,并把您的电脑旁。 http://www.dnzone.com/ShowDetail.asp?NewsId=356 C#是有点多标准的关键字命名。明知静态被称为静态还将帮助您使用Java,C ++和其他开发人员communitate。
Keywords and their translation to C# can be hard to get right at first. Shared = static, Me = this, MustInherit = abstract. etc. I found a list here that you can print out and put next to your computer. http://www.dnzone.com/ShowDetail.asp?NewsId=356 C# is a bit more standard in the naming of keywords. Knowing that a static is called a static will also help you communitate with Java, C++ and other developers.
事件也不同。做法有点创建和处理事件在C#中,你会得到它的窍门。
Events are also different. Practice a bit with creating and handling events in C# and you'll get the hang of it.
另外的东西大多是相同的。
Otherwise things are mostly the same.
这篇关于从VB.NET转换为C# - 什么建议吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!