welcome Netizen

Share Your Knowledge.It is a way to achieve immortality

Friday, June 8, 2012

Top 10 comparisons between VB.NET and C#

1.       C# is case sensitive one but is not case sensitive.

2.       C# we cannot able to choose to the page event or any event but in we can choose and select the event.

3.       C# does not support with statement but support with statement.

4.       Now latest v4.0  has support optional parameter  in both c# and, but before has support only optional parameters

5.       C# language is not user friendly one, but is very user friendly language.

6.       C# does support XML Documentation but does not support XML Documentation

7.       C# supports automatic memory management, but does not support automatic memory management

8.       C# supports pointer under unsafe keyword, but does not support pointer.

9.       C# supports operator overloading but does not support operator overloading

10.   VB.NET can also force parameters to be passed by value, regardless of how they are declared, by enclosing the parameters in extra parentheses. There is no way to achieve this thing in C#.

  For Example:

Dim y As Integer = 5
        Dim z As Integer
        z = Add(y) 'This will set both Y and Z to 6.
        z = Add((y)) 'This will set Z to 6 but Value of Y will not be change, as we have included extra parenthese while calling.

        'The Add function:

    Public Function Add(ByRef x As Integer) As Integer
        x = x + 1
        Return x
    End Function
By the code wise comparison refer the below link..

I hope I cover almost difference if anything missing please share here……


Post a Comment