Hi..
What is the Difference between c# and vb??...
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Apr 26, 2012, 9:08 AM
When the latest versions (C# 5.0 and VB 11) come on stream later this year, the only difference worth mentioning IMO is that C# supports the use of pointers in unsafe code but VB does not.
Moreover, both languages are to be evolved in parallel in future - if one language gets a major new feature, then the other one will get it as well.
SenthilkumarPosted Apr 26, 2012, 6:15 AM
There are plenty of article which talks about the difference between these two.
http://www.codeproject.com/Articles/9978/Complete-Comparison-for-VB-NET-and-C
http://support.microsoft.com/kb/308470
http://www.dotnetexpertguide.com/2010/02/differences-between-vbnet-and-cnet.html
http://www.harding.edu/fmccown/vbnet_csharp_comparison.html
http://deliciousdotnet.blogspot.com/2011/02/differences-between-vbnet-and-cnet.html
Satyapriya NayakPosted Apr 25, 2012, 8:47 AM
Please refer the below links
http://www.codeproject.com/Articles/9978/Complete-Comparison-for-VB-NET-and-C
http://www.dotnetfunda.com/articles/article601-difference-between-csharp-and-vbnet.aspx
Thanks
MuthuMari MPosted Apr 25, 2012, 8:03 AM
Hiding: – This is a C# Concept by which you can provide a new implementation for the base class member without overriding the member. You can hide a base class member in the derived class by using the keyword "new". The method signature, access level and return type of the hidden member has to be same as the base class member. Comparing the two:-
1) The access level, signature and the return type can only be changed when you are shadowing with VB.NET. Hiding and overriding demands these parameters as same.
2) The difference lies when you call the derived class object with a base class variable. In class of overriding although you assign a derived class object to base class variable it will call the derived class function. In case of shadowing or hiding the base class function will be called.
For Example:
Dim y As Integer = 5Dim 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 Integerx = x + 1
Return x
End Function
thanks.
If this post is useful then mark it as "Accepted Answer"