Quick question on this site..
-
And maybe VB.Net in general.. why is it looking a bit un-represented? No VB.Net tab on the front page here? A lack of articles? I've also noticed this from Microsoft itself in general? I'm a long time Powerbuilder guru whose looking at .Net and it had seemed now that VB finally has some inheritance along with better data support I thought it might be worth a hard look. However C# and C++ seem to have the heavy amount of attention. I'd rather not pick the wrong one and then have to start again.. while starting again. Can I assume this will be supported or will Microsoft continue to make me change gears either by smoking out their competitors [regardless of merit] or starving off their own languages? :confused: Craig Kazial
-
And maybe VB.Net in general.. why is it looking a bit un-represented? No VB.Net tab on the front page here? A lack of articles? I've also noticed this from Microsoft itself in general? I'm a long time Powerbuilder guru whose looking at .Net and it had seemed now that VB finally has some inheritance along with better data support I thought it might be worth a hard look. However C# and C++ seem to have the heavy amount of attention. I'd rather not pick the wrong one and then have to start again.. while starting again. Can I assume this will be supported or will Microsoft continue to make me change gears either by smoking out their competitors [regardless of merit] or starving off their own languages? :confused: Craig Kazial
Craig, The reason that you are seeing so much C#/VC++ on this site is that it's main contributors have heavy backgrounds in some C++ flavor. Due to the .NET Framework release, many of those same developers have decided to go against managed C++ in turn for C#. I work for a *strictly* VB shop right now and I assume that we will continue to go that route, however I myself am rather interested in C#. This site has been a great learning experience where I believe we can all benefit from each other. Take a look at our current competition where you can build a Code Project screen saver using the .NET Framework in any language, even VB.NET. Here is the link in a new window. The race to build the perfect Screen Saver. I hope this answer some of your questions. :) Nick Parker
-
And maybe VB.Net in general.. why is it looking a bit un-represented? No VB.Net tab on the front page here? A lack of articles? I've also noticed this from Microsoft itself in general? I'm a long time Powerbuilder guru whose looking at .Net and it had seemed now that VB finally has some inheritance along with better data support I thought it might be worth a hard look. However C# and C++ seem to have the heavy amount of attention. I'd rather not pick the wrong one and then have to start again.. while starting again. Can I assume this will be supported or will Microsoft continue to make me change gears either by smoking out their competitors [regardless of merit] or starving off their own languages? :confused: Craig Kazial
Part of the reason is due to the design of .NET I read all of the C# articles, and post in the C# forums (and know the answers sometimes too) because most of them, and most of the "work" in getting to know .NET is to do with the framework classes, and not the syntax of the language. I just convert the code in my head to VB.NET syntax and most of the time it works. I think VB.NET is a fantastic language, and I will keep using it, but I think that forums like this will not cover it much because, firstly, CP is a C++ oriented place, and secondly there is a stigma about "VB" that makes people think of bad programming, and indeed, in my experience, the language can attract bad programmers. Choice of C# vs VB.NET is a lot to do with IDE, neatness of syntax, and almost nothing to do with capabilities. Choose the one you feel confortable with, but you might have to look at both to find samples/help etc. -- David Wengier Sonork ID: 100.14177 - Ch00k
-
Part of the reason is due to the design of .NET I read all of the C# articles, and post in the C# forums (and know the answers sometimes too) because most of them, and most of the "work" in getting to know .NET is to do with the framework classes, and not the syntax of the language. I just convert the code in my head to VB.NET syntax and most of the time it works. I think VB.NET is a fantastic language, and I will keep using it, but I think that forums like this will not cover it much because, firstly, CP is a C++ oriented place, and secondly there is a stigma about "VB" that makes people think of bad programming, and indeed, in my experience, the language can attract bad programmers. Choice of C# vs VB.NET is a lot to do with IDE, neatness of syntax, and almost nothing to do with capabilities. Choose the one you feel confortable with, but you might have to look at both to find samples/help etc. -- David Wengier Sonork ID: 100.14177 - Ch00k
David Wengier wrote: Choice of C# vs VB.NET is a lot to do with IDE The IDE is the same for all languages in .NET. David Wengier wrote: and almost nothing to do with capabilities In fact, VB.NET has some limitations, like only one namespace in each assembly (it's a property of the project), no boolean shortcircuit evaluation, and so on. Ok, you can workaround most of them. I think that the language choice has more to do with the programming background you have: for me, every VB code I've written was a pain, and was because if I wrote in C++, I would have only a few programmers capable of mantaining my code. With C# I feel that other programmers in the team can read, understand and mantain my code, even if they only coded in VB... C# syntax is more elegant (in a C++ POV) than VB. Crivo Automated Credit Assessment
-
David Wengier wrote: Choice of C# vs VB.NET is a lot to do with IDE The IDE is the same for all languages in .NET. David Wengier wrote: and almost nothing to do with capabilities In fact, VB.NET has some limitations, like only one namespace in each assembly (it's a property of the project), no boolean shortcircuit evaluation, and so on. Ok, you can workaround most of them. I think that the language choice has more to do with the programming background you have: for me, every VB code I've written was a pain, and was because if I wrote in C++, I would have only a few programmers capable of mantaining my code. With C# I feel that other programmers in the team can read, understand and mantain my code, even if they only coded in VB... C# syntax is more elegant (in a C++ POV) than VB. Crivo Automated Credit Assessment
Daniel Turini wrote: The IDE is the same for all languages in .NET. The IDE is generally the same, but there are a few differences. The project properties are a bit different, plus other minor differences. Daniel Turini wrote: like only one namespace in each assembly (it's a property of the project) VB supports namespaces the same as C#.
Namespace MyNamespace.MyNestedNamespace
Class A ' Full name: MyNamespace.MyNestedNamespace.A
End Class
End NamespaceDaniel Turini wrote: no boolean shortcircuit evaluation You don't get short circuit evaluation using And/Or, but if you use AndAlso/OrElse you get short circuit evaluation. VB doesn't support:
- indexers: a special property which allows you to access an instance of a class like an array, instead you get an Items property.
- operator overloading: Allowing a class to create new meanings for +, -, *, /, etc
- Optional parameters: Create and call methods without any value being provided. As you'll see below it is supported but with a twist.
- unsigned types: This isn't too important because unsigned types are not compliant with the CLR anyway, they are provided for conveinence.
VB does support:
- Late binding: Calling methods on an object without having to know what type the object is, just that it supports that particular method signature.
- Optional parameters with default values: Just like C++ you don't have to provide values if you just want the default value. The default value is required, unlike VB6.
- Handles keyword: Events can be wired up at compile time without needing to use
myEvent += .....
, though if someone wants they can use the VB equivalent,AddHandler
.
Coming from using VB for all my real programming projects I naturally wanted to use VB.NET, but there were enough minor things that irked me into using C# instead. First, I prefer curly braces over Then, End *, etc. Second, I really did not like the addition of the short circuit keywords, I would have rather had And/Or do it. Third, I prefer curly braces :). Fourth, I did not care for using keywords like Shadows X| Aside from those differences there isn't a whole lot of difference between C# and VB.NET, 90% of your code is going to be using the .NET base class libraries so that is where a lot of the knowledge is going to be.
-
And maybe VB.Net in general.. why is it looking a bit un-represented? No VB.Net tab on the front page here? A lack of articles? I've also noticed this from Microsoft itself in general? I'm a long time Powerbuilder guru whose looking at .Net and it had seemed now that VB finally has some inheritance along with better data support I thought it might be worth a hard look. However C# and C++ seem to have the heavy amount of attention. I'd rather not pick the wrong one and then have to start again.. while starting again. Can I assume this will be supported or will Microsoft continue to make me change gears either by smoking out their competitors [regardless of merit] or starving off their own languages? :confused: Craig Kazial
Craig Kazial wrote: why is it looking a bit un-represented? #1 reason is that this is mainly a C++ development site, and many of the coders who are using .NET are doing so with managed C++ and C#. In my reply to Daniel I list some of the differences between VB.NET and C# and my reasons for choosing C# over VB.NET. In the end you have to make up your mind which language to follow, but I can almost guarantee that the MS VB MVPs will not let them drop VB anytime soon :) I would recommend learning a bit of C# for two reasons, to see which one you like, and so you can make use of 75% of the sample code out on the web. James Simplicity Rules!
-
David Wengier wrote: Choice of C# vs VB.NET is a lot to do with IDE The IDE is the same for all languages in .NET. David Wengier wrote: and almost nothing to do with capabilities In fact, VB.NET has some limitations, like only one namespace in each assembly (it's a property of the project), no boolean shortcircuit evaluation, and so on. Ok, you can workaround most of them. I think that the language choice has more to do with the programming background you have: for me, every VB code I've written was a pain, and was because if I wrote in C++, I would have only a few programmers capable of mantaining my code. With C# I feel that other programmers in the team can read, understand and mantain my code, even if they only coded in VB... C# syntax is more elegant (in a C++ POV) than VB. Crivo Automated Credit Assessment
Programming background is absolutely one of the things that will sway a decision, and it also sways the arguments. I agree with most of what you have said, and James mentioned about the short-circuiting. You did mention that the IDE is the same, and I have found this to be not true, and the areas that are different are annoying. I only find these annoying because of my background in VB though, and because of where I am used to finding things. For example, the two drop-downs at the top of a code window in VB work as they did in VB6, and I find this very useful. Whenever I start up a C# project, I always fumble around for a little while trying to remember how to get it to insert the method signitures of any interfaces I am implementing. There is also things like reformating of code (automatic indenting for example). I find that VB does this at every stage, whereas C# doesnt. I like it, but I can see it would be enough to annoy people. Related to that, the error checking that is done in VB is realtime, so as you type. In C# it happens at build time. Now these points, it is obvious that I come from, and like, VB. It is easy to see how these features would irk a C# or C++ programmer, but there are enough of them (i feel) to make it an issue when deciding. -- David Wengier Sonork ID: 100.14177 - Ch00k
-
Daniel Turini wrote: The IDE is the same for all languages in .NET. The IDE is generally the same, but there are a few differences. The project properties are a bit different, plus other minor differences. Daniel Turini wrote: like only one namespace in each assembly (it's a property of the project) VB supports namespaces the same as C#.
Namespace MyNamespace.MyNestedNamespace
Class A ' Full name: MyNamespace.MyNestedNamespace.A
End Class
End NamespaceDaniel Turini wrote: no boolean shortcircuit evaluation You don't get short circuit evaluation using And/Or, but if you use AndAlso/OrElse you get short circuit evaluation. VB doesn't support:
- indexers: a special property which allows you to access an instance of a class like an array, instead you get an Items property.
- operator overloading: Allowing a class to create new meanings for +, -, *, /, etc
- Optional parameters: Create and call methods without any value being provided. As you'll see below it is supported but with a twist.
- unsigned types: This isn't too important because unsigned types are not compliant with the CLR anyway, they are provided for conveinence.
VB does support:
- Late binding: Calling methods on an object without having to know what type the object is, just that it supports that particular method signature.
- Optional parameters with default values: Just like C++ you don't have to provide values if you just want the default value. The default value is required, unlike VB6.
- Handles keyword: Events can be wired up at compile time without needing to use
myEvent += .....
, though if someone wants they can use the VB equivalent,AddHandler
.
Coming from using VB for all my real programming projects I naturally wanted to use VB.NET, but there were enough minor things that irked me into using C# instead. First, I prefer curly braces over Then, End *, etc. Second, I really did not like the addition of the short circuit keywords, I would have rather had And/Or do it. Third, I prefer curly braces :). Fourth, I did not care for using keywords like Shadows X| Aside from those differences there isn't a whole lot of difference between C# and VB.NET, 90% of your code is going to be using the .NET base class libraries so that is where a lot of the knowledge is going to be.
James T. Johnson wrote: Optional parameters: Create and call methods without any value being provided But because of overloading, it can be done with two different methods, just leave out one parameter :) James T. Johnson wrote: Handles keyword: Events can be wired up at compile time without needing to use myEvent += ....., though if someone wants they can use the VB equivalent, AddHandler. And how could anybody want to use anything else! In all of my C# code, whenever I accidently create an event handler I dont want, I think "oh damn" and delete the method. Then, come build time, bring on the errors, as the code, miles up in the file, hidden in the GUI created #region, mentions these missing methods. X| (I seem to be just replying to you and ranting these days... you must have a friendly face :)) -- David Wengier Sonork ID: 100.14177 - Ch00k