|
Comments and Discussions
|
|
Thanks Amal, since I am involved in a project currently, in rewriting the legacy ASP into ASP.Net with VB.Net as language of choice, and am basically from the C# background. I hope this article will help me in understanding the differences.
|
|
|
|
|
thanks
diligent hands rule....
|
|
|
|
|
Too good and Good enough to switch from one to another language for Beginner's.
|
|
|
|
|
Concise and clear topic, thanks a lot!
|
|
|
|
|
|
Thanks for the effort.
Really helpful.
|
|
|
|
|
|
I appreciate the work you've done on this article, but it could use a number of corrections:
1) Your "variable" modifiers are incorrect
These apply to fields or properties or methods/functions/subroutines, but not variables:
Public, Protected, Friend, Private, Static/Shared, Shadows
C# equivalents:
Public = public
Protected = protected
Friend = internal
Private = private
methods/functions/subroutines only:
Shared = static
Shadows = new
2) VB.NET "Structure" = C# "structure", not C# "class" or "interface"
C# equivalents:
Structure = structure
Class = class
Interface = interface
3) VB.NET "AddressOf" is not equivalent to C# "delegate"
VB.NET "Delegate" = C# "delegate"
VB.NET "AddressOf" is implicit in C#, there is no equivalent.
4) VB.NET "IsDbNull" = C# exampleVariable == System.DbNull.Value or exampleSqlReader.IsDbNull(exampleVariable)
5) VB.NET "Shadows" = C# "new" modifier
6) VB.NET "Select Case" is semantically similar to C# "switch" but they're not the same thing at all
7) You mention XML comments as if they're the same as other comments, but that's incorrect,
VB.NET single-line comment = '
C# single-line comment = //
VB.NET does not have multi-line comments
C# multi-line comments = /* */
separately, if you wish to document your code with XML comments (and you definitely should) as outlined here: https://msdn.microsoft.com/en-us/library/vstudio/b2s063f7%28v=vs.100%29.aspx
VB.NET =
Class Apple
End Class
C# =
class Apple {
}
or C# =
class Apple {
}
Thanks,
Sam
|
|
|
|
|
nice article 
|
|
|
|
|
|
is there going to be an Update on this nice post?
I guess there are many things new to both languages...
|
|
|
|
|
I agree with craigg75, that is all.
|
|
|
|
|
Good one now i am felling Conferrable in VB
|
|
|
|
|
It is interesting thing. Microsoft planned that developers will use both languages at the same moment at the same project. But we see in web only dirty debates which is better. Ohh...
Great article, thank!
|
|
|
|
|
We had a hard time figuring out, what the colon means in Visual Basic. My first attempt to find out here, but I didn't see it. I suggest to add this to one of the tables:
Separating code statements on a single line: ":" in Visual Basic, ";" in C#
|
|
|
|
|
I would suggest adding statements 'Imports' (VB.NET) and 'using' (C#).
|
|
|
|
|
|
AFAIK the C# keyword for IsDbNull is IsNull
|
|
|
|
|
It is a good article for beginners. More updates are needed.
|
|
|
|
|
Article is way out of date. For those starting in .NET you need to review the newer features of C# and VB. For example, C# has optional parameters - the article says not. Several other things are missing such as the more extensive use of generics.
|
|
|
|
|
great article. its very good for beginners to understand the difference between both languages.
|
|
|
|
|
Thanks for sharing! Gets my 5. 
|
|
|
|
|
Useful reference, thought could maybe do with some updating. 
|
|
|
|
|
mole holes
by Chris Sowa
oh, to be a cosmic mole
in and out of planck-sized holes
experiencing all as whole
trying to preserve one's soul
|
|
|
|
|
|
|
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
|