Looking for a good C# to VB.NET converter
-
Christian Graus wrote: they both compile to IL, however the C# compiler creates faster code Are you sure? I know C++ generates more optimized IL, but I have never heard that C# should make more efficient IL than VB.NET. - Anders Bill's Bar
My PhotosWDevs - The worlds first DSP, free blog space, email and more. Now also with forums :)
The guy who told me this was a VB.NET programmer ( the one who threatened to beat me up for saying that VB.NET sucks ), it was in his list of things he wishes would change about VB.NET. Given that he was on the VB.NET side, and pretty vocal, I doubt he'd suggest it if it were not true. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
It is not a sample - it is 550 samples (and growing) in three separate products.
IMNSHO - a sample spit out by an automatic converter, without "manual tweaking" somehow defeats it's purpose. I've done a bit of walking through Fortran-translated-to-C code
I never really know a killer from a savior
boost your code || Fold With Us! || sighist | doxygen -
OK, I get it. Look, I'm sorry, but VB.NET is not programming, it's a mental enema. Having said that, I stand by my prior comment - you will not find a converter that will do all the work for you, only one that will give you a broad base to work off. Given how similar the syntax is, if you can't work out how to make the sample compile, you should probably give up programming and become a goat herder. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
If you judge your programming language by it's syntax then you're easily pleased. I'd rather judge a language on what it can achieve, how it works with other languages, what libraries are available for use and what sort of support is in place for that language. But that's just me. cheers, Chris Maunder
-
Can anybody recommend a good C# to VB.NET converter that can convert entire C# projects? I tried several and none of them produce code that can compile. I need to automate converting several thousand lines of code on a regular basis. Manual tweaking is not an option.
Regarding your question about c# to vb.net converters, well that's tough. I understand your situation, and although converting c# to vb.net is a walk in the park, performing that walk 550 times is quite a tedious task. If you're wondering why there are so many vb.net to c# converters yet not the reverse, the answer I believe is quite simple. Many legacy COM applications were built in VB for pure RAD reasons, which otherwise would have been built in MFC. When vb.net was released people were able to upgrade great big portions of their vb 6 apps with the upgrade wizard and then manually changing the 20% that was not successfully converted. Once the project was all vb.net, a vb.net to c# converter could be used to finally bring the application closer, at least in syntax, to a c++ style environment, although to say that c++ and c# are the same is plain ignorance, for there is no language that even reaches the knees of c++. Back to the point, many vendors saw this opportunity and thus the availability of so many converters. Second, pay no attention to all the vb trash talk that goes around here, especially that produced by Christian. Most, if not all, of his arguments are completely flawed, and are just the result of his ignorance about the language. Don't get me wrong, I love and encourage language wars, for I believe they are healthy; however, insulting people just for using a particular language is just not my style. Also, and just to reemphasize, except for syntax, c# and vb.net are more similar to each other than c# is similar to c++. I have absolutely no hands on experiece with c++ but I come from an academic background, and after having had to take so many classes in c++, there's no doubt it is the king of kings. Also, expect to see lots of horrendous c# code in the not too distant future. I don't know if you've worked with 2.0 yet, but there's no doubt that c# is loosing its identity in response to so many vb programmers switching over. The intellisense, edit and continue, etc..., all feature that go against the hard core c style of programming yet are finding a place in c#. Why is this? Christian, you there?????? You wanna battle?????
-
Christian Graus wrote: they both compile to IL, however the C# compiler creates faster code Are you sure? I know C++ generates more optimized IL, but I have never heard that C# should make more efficient IL than VB.NET. - Anders Bill's Bar
My PhotosWDevs - The worlds first DSP, free blog space, email and more. Now also with forums :)
this is only the case because of the instrinsics of the vb language for example, dim i as integer if foo then i = 1 else i = 2 end if how many il assigments take place to i??????? find out dim s as string if s = string.empty then foo() End if will the il compare s only to the empty string constant "" or will it compare it also to a null reference???? find out
-
I think Igor is running into the crowd that just cuts and pastes example code into production products. Also, they probably want to avoid all the questions like you use += on an event. How do I do that in VB? :^)
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
addhandler
-
If you judge your programming language by it's syntax then you're easily pleased. I'd rather judge a language on what it can achieve, how it works with other languages, what libraries are available for use and what sort of support is in place for that language. But that's just me. cheers, Chris Maunder
Hi Chris. For some reason, you've jumped on my prior comment that VB.NET syntax sucks ( and you did so even at the time ). It does, but that's the least of it. I'm more concerned about things like empty strings being equal to Nothing, and functions magically generating their own return values. There is not one thing you've listed where VB.NET is in any way better than C#, and there are a myriad of ways in which it is worse. The main problem with VB.NET though is that too many idiots are using it. I've never claimed that no VB.NET user can program properly, but through working on other peoples projects, I can testify that most C# projects I see are reasonably well put together, and none come close to as bad as the mid rangeof the VB.NET projects I've worked on. The worst of them are just plain excreble. The trouble is that it's hard to convince a client that the code base they have, which sort of works, albeit with plenty of bugs, is useless in the long term, and they'd do better to have the whole thing done properly from a design standpoint before they worry about bug fixes and extensions. Last time we discussed VB.NET, a former VB6 user said that VB.NET started well, and was killed by VB6 users crying for backward compatibility with features that deserved to die. He also said that all real programmers had moved to C#. That's the opinion of a VB user who is also a programmer. The core issue really is that VB.NET users are surely close to all VB6 migrants, so the new features do not get used, the old syntax is used instead. I've worked on VB.NET ASP.NET projects where the code did not use viewstate, always posted back and put everything on the URL, etc. It was an old asp site with VB.NET replacing vbscript. VB.NET sucks because VB6 sucked. Yes, it generates IL, although I'm told not as efficiently as the C# compiler, but if all we wanted from a language was to generate raw code, why move away from C++ ? Or C ? Or assembler ? A language is as good as both the facilities it offers, and the rules it uses to both enforce good practice, and leave a good programmer with freedom to break the rules when needed. C++ did that better than C# does, IMO. VB.NET doesn't do it at all, it's loaded with gotchas and poor design decisions. Functions invent their own return values ? Who decided that was a good idea ? Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
addhandler
He wasn't asking, he was showing an example of the sort of question he doubts these people want to have to answer. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
He wasn't asking, he was showing an example of the sort of question he doubts these people want to have to answer. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
oh well, i'll answer anyways
-
Regarding your question about c# to vb.net converters, well that's tough. I understand your situation, and although converting c# to vb.net is a walk in the park, performing that walk 550 times is quite a tedious task. If you're wondering why there are so many vb.net to c# converters yet not the reverse, the answer I believe is quite simple. Many legacy COM applications were built in VB for pure RAD reasons, which otherwise would have been built in MFC. When vb.net was released people were able to upgrade great big portions of their vb 6 apps with the upgrade wizard and then manually changing the 20% that was not successfully converted. Once the project was all vb.net, a vb.net to c# converter could be used to finally bring the application closer, at least in syntax, to a c++ style environment, although to say that c++ and c# are the same is plain ignorance, for there is no language that even reaches the knees of c++. Back to the point, many vendors saw this opportunity and thus the availability of so many converters. Second, pay no attention to all the vb trash talk that goes around here, especially that produced by Christian. Most, if not all, of his arguments are completely flawed, and are just the result of his ignorance about the language. Don't get me wrong, I love and encourage language wars, for I believe they are healthy; however, insulting people just for using a particular language is just not my style. Also, and just to reemphasize, except for syntax, c# and vb.net are more similar to each other than c# is similar to c++. I have absolutely no hands on experiece with c++ but I come from an academic background, and after having had to take so many classes in c++, there's no doubt it is the king of kings. Also, expect to see lots of horrendous c# code in the not too distant future. I don't know if you've worked with 2.0 yet, but there's no doubt that c# is loosing its identity in response to so many vb programmers switching over. The intellisense, edit and continue, etc..., all feature that go against the hard core c style of programming yet are finding a place in c#. Why is this? Christian, you there?????? You wanna battle?????
Giancarlo Aguilera wrote: Most, if not all, of his arguments are completely flawed, and are just the result of his ignorance about the language. ROTFL. Actually, I thought you generated my standard list of comments about VB.NET. Wasn't it you who pointed out that an empty string == Nothing in VB.NET, etc. ? I found out that functions invent their own return value on my own..... Giancarlo Aguilera wrote: however, insulting people just for using a particular language is just not my style. As I recall, last time I said that VB sucks, you took it incredibly personally. I've never said that all VB.NET programmers are idiots ( although the majority of VB.NET code I've seen was plainly written by idiots ). Giancarlo Aguilera wrote: Also, and just to reemphasize, except for syntax, c# and vb.net are more similar to each other than c# is similar to c++. Yes, this is true. Giancarlo Aguilera wrote: I have absolutely no hands on experiece with c++ but I come from an academic background, and after having had to take so many classes in c++, there's no doubt it is the king of kings. You took C++ classes, but you've never coded in it ? How does THAT work ? Giancarlo Aguilera wrote: Also, expect to see lots of horrendous c# code in the not too distant future. This could well be the case, because C#, like VB6 and VB.NET, definately is easy enough for a newbie programmer to feel they know what they are doing, just because their code does not crash. But for now the truly terrible code seems to be more in the VB.NEt end of the field. Giancarlo Aguilera wrote: I don't know if you've worked with 2.0 yet, but there's no doubt that c# is loosing its identity in response to so many vb programmers switching over. The intellisense, edit and continue, etc..., all feature that go against the hard core c style of programming yet are finding a place in c#. Why is this? This is plain stupid. edit and continue existed in VC6, and intellisence has always been there. C# is growing to be more like C++ with the addition of things like templates. I don't really like anonymous methods, but iterators rock, and templates should have been there from the beginning. You're talking about IDE features. There is nothing wrong with the IDE providing means to make it easier to focus on the code. otherwise, we'd all be using notepad.
-
oh well, i'll answer anyways
*grin* can't hurt, I suppose. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
Hi Chris. For some reason, you've jumped on my prior comment that VB.NET syntax sucks ( and you did so even at the time ). It does, but that's the least of it. I'm more concerned about things like empty strings being equal to Nothing, and functions magically generating their own return values. There is not one thing you've listed where VB.NET is in any way better than C#, and there are a myriad of ways in which it is worse. The main problem with VB.NET though is that too many idiots are using it. I've never claimed that no VB.NET user can program properly, but through working on other peoples projects, I can testify that most C# projects I see are reasonably well put together, and none come close to as bad as the mid rangeof the VB.NET projects I've worked on. The worst of them are just plain excreble. The trouble is that it's hard to convince a client that the code base they have, which sort of works, albeit with plenty of bugs, is useless in the long term, and they'd do better to have the whole thing done properly from a design standpoint before they worry about bug fixes and extensions. Last time we discussed VB.NET, a former VB6 user said that VB.NET started well, and was killed by VB6 users crying for backward compatibility with features that deserved to die. He also said that all real programmers had moved to C#. That's the opinion of a VB user who is also a programmer. The core issue really is that VB.NET users are surely close to all VB6 migrants, so the new features do not get used, the old syntax is used instead. I've worked on VB.NET ASP.NET projects where the code did not use viewstate, always posted back and put everything on the URL, etc. It was an old asp site with VB.NET replacing vbscript. VB.NET sucks because VB6 sucked. Yes, it generates IL, although I'm told not as efficiently as the C# compiler, but if all we wanted from a language was to generate raw code, why move away from C++ ? Or C ? Or assembler ? A language is as good as both the facilities it offers, and the rules it uses to both enforce good practice, and leave a good programmer with freedom to break the rules when needed. C++ did that better than C# does, IMO. VB.NET doesn't do it at all, it's loaded with gotchas and poor design decisions. Functions invent their own return values ? Who decided that was a good idea ? Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
My point was that while VB has a lot of inconsistencies and issues relating to legacy compatibility, IMO it's still far, far better than many other options (FORTRAN, Delphi, Java). Not syntactically, not in terms of "Why on Earth did they do that", but because it has great support, great tools, and an excellent suppport library. So my argument is, I admit, a little shoddy. Essentially I'm saying any .NET language supported by VS.NET isn't too shabby. And I know you're point is that compared to C#, VB is a dog's breakfast. I'm just playing Devil's Advocate. cheers, Chris Maunder
-
Giancarlo Aguilera wrote: Most, if not all, of his arguments are completely flawed, and are just the result of his ignorance about the language. ROTFL. Actually, I thought you generated my standard list of comments about VB.NET. Wasn't it you who pointed out that an empty string == Nothing in VB.NET, etc. ? I found out that functions invent their own return value on my own..... Giancarlo Aguilera wrote: however, insulting people just for using a particular language is just not my style. As I recall, last time I said that VB sucks, you took it incredibly personally. I've never said that all VB.NET programmers are idiots ( although the majority of VB.NET code I've seen was plainly written by idiots ). Giancarlo Aguilera wrote: Also, and just to reemphasize, except for syntax, c# and vb.net are more similar to each other than c# is similar to c++. Yes, this is true. Giancarlo Aguilera wrote: I have absolutely no hands on experiece with c++ but I come from an academic background, and after having had to take so many classes in c++, there's no doubt it is the king of kings. You took C++ classes, but you've never coded in it ? How does THAT work ? Giancarlo Aguilera wrote: Also, expect to see lots of horrendous c# code in the not too distant future. This could well be the case, because C#, like VB6 and VB.NET, definately is easy enough for a newbie programmer to feel they know what they are doing, just because their code does not crash. But for now the truly terrible code seems to be more in the VB.NEt end of the field. Giancarlo Aguilera wrote: I don't know if you've worked with 2.0 yet, but there's no doubt that c# is loosing its identity in response to so many vb programmers switching over. The intellisense, edit and continue, etc..., all feature that go against the hard core c style of programming yet are finding a place in c#. Why is this? This is plain stupid. edit and continue existed in VC6, and intellisence has always been there. C# is growing to be more like C++ with the addition of things like templates. I don't really like anonymous methods, but iterators rock, and templates should have been there from the beginning. You're talking about IDE features. There is nothing wrong with the IDE providing means to make it easier to focus on the code. otherwise, we'd all be using notepad.
CG wrote: "ROTFL. Actually, I thought you generated my standard list of comments about VB.NET. Wasn't it you who pointed out that an empty string == Nothing in VB.NET, etc. ? I found out that functions invent their own return value on my own....." precisely, you needed someone else's premises for your argument. Never said it was perfect, but as long as patterns are implementable and you're getting good money doing it, why not? besides its only getting better in 2.0m with some exception, which I can list for you so that you can continue moaning and groaning. CG wrote: "You took C++ classes, but you've never coded in it ? How does THAT work ?" Never had to, nor was asked to VB 6 did it all, and where it didn't, pulled out the wallet and bought some awesome tools. Why fight it? CG wrote: "As I recall, last time I said that VB sucks, you took it incredibly personally. I've never said that all VB.NET programmers are idiots ( although the majority of VB.NET code I've seen was plainly written by idiots )." CG: "This could well be the case, because C#, like VB6 and VB.NET, definately is easy enough for a newbie programmer to feel they know what they are doing, just because their code does not crash. But for now the truly terrible code seems to be more in the VB.NEt end of the field" let time takes its toll, ch, ch, ch, changes!!!!!!!!!!! Already apologized for that, because like I said, it's not my style, yet it sure is your style to insult people. you've obviously got issues that go beyond programming. CG wrote: "This is plain stupid. edit and continue existed in VC6, and intellisence has always been there. C# is growing to be more like C++ with the addition of things like templates. I don't really like anonymous methods, but iterators rock, and templates should have been there from the beginning." you can honestly say with a straight face that VC6's edit and continue was like VB's? CG: "Why ? We did it before, you not only agreed with some of my points, but provided a further list of reasons that C# kills VB.NET. Go back and reread it, it'll have the same effect." Why you ask? Why not, it's fun, and I currently having nothing to do besides playing, production is complete!
-
Giancarlo Aguilera wrote: Most, if not all, of his arguments are completely flawed, and are just the result of his ignorance about the language. ROTFL. Actually, I thought you generated my standard list of comments about VB.NET. Wasn't it you who pointed out that an empty string == Nothing in VB.NET, etc. ? I found out that functions invent their own return value on my own..... Giancarlo Aguilera wrote: however, insulting people just for using a particular language is just not my style. As I recall, last time I said that VB sucks, you took it incredibly personally. I've never said that all VB.NET programmers are idiots ( although the majority of VB.NET code I've seen was plainly written by idiots ). Giancarlo Aguilera wrote: Also, and just to reemphasize, except for syntax, c# and vb.net are more similar to each other than c# is similar to c++. Yes, this is true. Giancarlo Aguilera wrote: I have absolutely no hands on experiece with c++ but I come from an academic background, and after having had to take so many classes in c++, there's no doubt it is the king of kings. You took C++ classes, but you've never coded in it ? How does THAT work ? Giancarlo Aguilera wrote: Also, expect to see lots of horrendous c# code in the not too distant future. This could well be the case, because C#, like VB6 and VB.NET, definately is easy enough for a newbie programmer to feel they know what they are doing, just because their code does not crash. But for now the truly terrible code seems to be more in the VB.NEt end of the field. Giancarlo Aguilera wrote: I don't know if you've worked with 2.0 yet, but there's no doubt that c# is loosing its identity in response to so many vb programmers switching over. The intellisense, edit and continue, etc..., all feature that go against the hard core c style of programming yet are finding a place in c#. Why is this? This is plain stupid. edit and continue existed in VC6, and intellisence has always been there. C# is growing to be more like C++ with the addition of things like templates. I don't really like anonymous methods, but iterators rock, and templates should have been there from the beginning. You're talking about IDE features. There is nothing wrong with the IDE providing means to make it easier to focus on the code. otherwise, we'd all be using notepad.
it's obvious I am not popular around here
-
My point was that while VB has a lot of inconsistencies and issues relating to legacy compatibility, IMO it's still far, far better than many other options (FORTRAN, Delphi, Java). Not syntactically, not in terms of "Why on Earth did they do that", but because it has great support, great tools, and an excellent suppport library. So my argument is, I admit, a little shoddy. Essentially I'm saying any .NET language supported by VS.NET isn't too shabby. And I know you're point is that compared to C#, VB is a dog's breakfast. I'm just playing Devil's Advocate. cheers, Chris Maunder
LOL - when we use FORTRAN as the base case, anything looks good. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
LOL - when we use FORTRAN as the base case, anything looks good. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
Don't you start dissing FORTRAN. :mad: cheers, Chris Maunder
-
CG wrote: "ROTFL. Actually, I thought you generated my standard list of comments about VB.NET. Wasn't it you who pointed out that an empty string == Nothing in VB.NET, etc. ? I found out that functions invent their own return value on my own....." precisely, you needed someone else's premises for your argument. Never said it was perfect, but as long as patterns are implementable and you're getting good money doing it, why not? besides its only getting better in 2.0m with some exception, which I can list for you so that you can continue moaning and groaning. CG wrote: "You took C++ classes, but you've never coded in it ? How does THAT work ?" Never had to, nor was asked to VB 6 did it all, and where it didn't, pulled out the wallet and bought some awesome tools. Why fight it? CG wrote: "As I recall, last time I said that VB sucks, you took it incredibly personally. I've never said that all VB.NET programmers are idiots ( although the majority of VB.NET code I've seen was plainly written by idiots )." CG: "This could well be the case, because C#, like VB6 and VB.NET, definately is easy enough for a newbie programmer to feel they know what they are doing, just because their code does not crash. But for now the truly terrible code seems to be more in the VB.NEt end of the field" let time takes its toll, ch, ch, ch, changes!!!!!!!!!!! Already apologized for that, because like I said, it's not my style, yet it sure is your style to insult people. you've obviously got issues that go beyond programming. CG wrote: "This is plain stupid. edit and continue existed in VC6, and intellisence has always been there. C# is growing to be more like C++ with the addition of things like templates. I don't really like anonymous methods, but iterators rock, and templates should have been there from the beginning." you can honestly say with a straight face that VC6's edit and continue was like VB's? CG: "Why ? We did it before, you not only agreed with some of my points, but provided a further list of reasons that C# kills VB.NET. Go back and reread it, it'll have the same effect." Why you ask? Why not, it's fun, and I currently having nothing to do besides playing, production is complete!
Giancarlo Aguilera wrote: precisely, you needed someone else's premises for your argument. No, someone else came along, who was supposed to be supporting VB.NET, and instead added to my arguments. You strengthened my case, you did not build it tho. Giancarlo Aguilera wrote: Never said it was perfect, but as long as patterns are implementable and you're getting good money doing it, why not? Because 1/ Patterns are not everything. The fact that you can impliment abstract factory (i.e. the fact that the language has classes ) does not mean that everything about the language is good, or even that most of it is. 2/ The money is also good using real languages. And the money is better, because you can work faster, and therefore do more work. Giancarlo Aguilera wrote: Never had to, nor was asked to VB 6 did it all, and where it didn't, pulled out the wallet and bought some awesome tools. Why fight it? Yeah, that seems to be your attitude. Let VB6 do it all, any real work you can pay someone else to write a C++ component. Not dissing you, that's how VB6 survived. It doesn't answer my question. How were you tested in your C++ class, if you never actually wrote any C++ ? What was the class for ? Giancarlo Aguilera wrote: you've obviously got issues that go beyond programming. ROTFL !!! Loving it..... Giancarlo Aguilera wrote: you can honestly say with a straight face that VC6's edit and continue was like VB's? No, not at all. But it was there, it's hardly new or unique to C#. The nature of .NET makes edit and continue easy to impliment, just get the function to recompile. Giancarlo Aguilera wrote: Why you ask? Why not, it's fun, and I currently having nothing to do besides playing, production is complete! Yeah, well, sadly I have to finish yet more bugs on this worthless VB.NET project. The original author should be shot. I fix all the bugs, and the client finds new ones ( that is, ones that were always there, but they just keep surfacing as I make more and more of the site finally work to the point that it can be browsed to ). Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
it's obvious I am not popular around here
Don't worry about it. Post voting sucks. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
it's obvious I am not popular around here
Hey if you spend your life learning a system and then they try to yank the rug from underneath you, well you are likely to stomp on that rug and try to pull it back, if there is a good reason. I don't know if C#.Net is better, but considering the time it took me to get familiar with MSVC++, I very much doubt if I am going to give up without a struggle. If this is just corporate shenigans to make make money off of a new system then I am sure as sugar going to pull back. The executables are huge, the IDE is certainly no improvement, and the main argument for is that it standardizes typical functions into a platform independent, cross-language object is just not good enough for me personally to move all of my code into this new improved system. It is also slow as Hell with same idiotic problems that Java had. These are 3Ghz machines what more do they need? Slowwwww. Good God, what is happening under the hood here?
-
addhandler
Thanks? I wasn't looking for an actual reply, especially since the correct answer is look it up in MSDN. However, I think this is one case where VB makes more sense then C#. The C# syntax seems like something a new developer that just learned about operator overloading would do.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon