问题描述
我是一名经验丰富的VB.NET开发,谁愿意开始用C#。我在寻找一个基于网络之间的比较这两种语言的语法快速参考。
I’m an experienced VB.NET developer, who wants to start with C#. I’m searching for a web based comparison between both languages syntax as quick reference.
我发现自己安排VB.NET语法模板,如...
I found myself arranging VB.NET syntax templates such as...
Public MustInherit Class BaseClass
Public MustOverride Sub PublicMustOverrideSub(ByVal byValParam As Integer, ByRef byRefParam As String)
Protected MustOverride Function ProtectedMustOverrideFunc() As Double
Friend Sub FriendSubWithParamArray(ByVal ParamArray params() As Byte)
End Sub
Private Property PrivateProperty() As Integer
Get
End Get
Set(ByVal value As Integer)
End Set
End Property
Friend ReadOnly Property FriendReadOnlyProperty() As String
Get
Return String.Empty
End Get
End Property
Public WriteOnly Property PublicWriteOnlyProperty() As Double
Set(ByVal value As Double)
End Set
End Property
End Class
...开始开发融合......
...starting Developer Fusion...
public abstract class BaseClass
{
public abstract void PublicMustOverrideSub(int byValParam, ref string byRefParam);
protected abstract double ProtectedMustOverrideFunc();
internal void FriendSubWithParamArray(params byte[] @params)
{
}
private int PrivateProperty {
get { }
set { }
}
internal string FriendReadOnlyProperty {
get { return string.Empty; }
}
public double PublicWriteOnlyProperty {
set { }
}
}
...和消费的结果。但是,必须有一个更好的办法。你知道吗?
...and consuming the results. But there must be a better way. Do you know one?
推荐答案
C#和VB.net code位的COM prehensive对比可以在
A comprehensive comparison of C# and VB.net code bits can be found at http://www.harding.edu/fmccown/vbnet_csharp_comparison.html
关于是一个VB开发移动到C#一篇非常好的文章:的
A very good article about being a VB dev moving to C#: http://visualstudiomagazine.com/articles/2008/12/01/what-vb-devs-should-know-about-c.aspx
如果你到网上演员,有关于这个问题的一些非常好的DNRTV发作。肯定检查出来:
If you're into web casts, there's some very good DNRTV episodes on this subject. Definately check them out:
- Bill Wagner on Learning C#.NET FromVB.NET
- Kathleen Dollard onComparing C# and VB in .NET 3.5
- Kathleen Dollard on Comparing C# andVB in .NET 3.5 Part 2
这篇关于搜索系统,COM prehensive和VB.NET和C#语法之间的完全对比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!