Re: END function in .NET???
Quote:
Originally Posted by Mike Hildner
Because in general, C# programmers are much sexier than VB programmers.
Seriously though, C# programmers get paid more than VB.NET programmers. There are things you can do in C# that you can't do in VB.NET - unsafe code blocks, for example. Other than that, IMHO, C# code is much cleaner and easier to read than VB.
What can you do in C# and cannot do VB.Net, is it worth me starting to learn C# ????
<Shocked Dino>
Re: END function in .NET???
Quote:
Originally Posted by Mike Hildner
Because in general, C# programmers are much sexier than VB programmers.
Seriously though, C# programmers get paid more than VB.NET programmers. There are things you can do in C# that you can't do in VB.NET - unsafe code blocks, for example. Other than that, IMHO, C# code is much cleaner and easier to read than VB.
Its all what you get used to, i prever VB for exactly the same reason :D
Unsafe code is C# code that uses pointers. I don't like the way C# does it though, its as if there is a stigma in using pointers.
Its not that VB can't do the same stuff as C#'s unsafe code, but not having pointers, VB must do it a different way.
This is all swings and roundabouts.
Re: END function in .NET???
There's a little more to it than just unsafe code. Read this. Of course, stick with whatever you like, or go both ways, who cares? Personally I prefer one syntax over another, but that's just me.
Re: END function in .NET???
Quote:
Originally Posted by Asgorath
Hi
No you don't have to set them to nothing.
Regards
Jorge
HEY, That's a double negative!! Bad grammar! Bad! ;)
In general, variables declared within a function block are not created on the heap, but are created on the stack, and are gone as soon as the function returns. Considering that .NET goes through the IL, I don't know whether or not that is true for .NET code or not. Does anybody know? Does anybody care, considering that garbage collection would have the same apparent result regardless of actual behavior?
One thing to keep in mind is that a part of this argument is form over function. I remember people complaining about C++ (back during ANSI standardization time) because it wasn't "REALLY" OO the way that a language such as SmallTalk was because you could still have global variables and code outside of objects.
I've always been bothered by people who rationalize a certain design practice because it follows a prescribed 'form'. I have currently moved away from most global basic types (strings, ints, etc.), and included what would have been global basic types into classes that include some functions for doing manipulations across all the variables. While this has advantages for organization, I certainly wouldn't claim it to be any doctrine.
The goal is to balance functionality, efficiency and maintainability. C# and VB are almost indistinguishable in all three areas. While there are differences, most people will probably not encounter those differences, so which language they choose depends more on familiarity (and thus maintainability) rather than language features.
Enough rambling.