Rich Wallace said:
I'm new to .NET and a book I'm working through gives examples in both VB.NET
and C#.
C# looks pretty simple to pick up especially if you have ever worked with
JavaScript or looked at Java.
There are a few differences between vb.net and C# though namely....
C# is case sensitive.
Variable types go before variable names.
Each line must end in a semi-colon.
No subs... use the void keyword instead to denote that a function returns
nothing.
"Imports" becomes "using"
"Me.xxx" becomes "This.xxx"
The keyword "inherits" isn't used in a class declaration.
That's some syntax/logic differences that spring to mind.
Oh yep another one..... destructs are coded in C# by placing a tilde (~)
before the object name as opposed to setting the object to "Nothing"
Cheers
Jay