代码之家  ›  专栏  ›  技术社区  ›  Dirk Brockhaus

VB.NET与C语法的系统、全面、完整的检索比较#

  •  3
  • Dirk Brockhaus  · 技术社区  · 14 年前

    我是一个经验丰富的vb.net开发人员,想从C开始。我正在搜索两种语言之间基于Web的比较语法作为快速参考。

    我发现自己在安排vb.net语法模板,比如…

    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
    

    …正在启动开发人员融合…

    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 { }
        }
    }
    

    …并消耗结果。但一定有更好的方法。你认识一个吗?

    1 回复  |  直到 14 年前
        1
  •  3
  •   Patrick Karcher    14 年前