I have recently acquired a fairly large VB.NET project (30,000 LoC). I would like to integrate this in my primarily C# project. I know I could leave it all as VB code, but I vastly perfer C#.
Do you think this is plausible?
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
I have recently acquired a fairly large VB.NET project (30,000 LoC). I would like to integrate this in my primarily C# project. I know I could leave it all as VB code, but I vastly perfer C#.
Do you think this is plausible?
can be done, yes... but it will take a lot of time to go thru all that code...
is it one dll / exe or is it multiple projects in one solution ?
multiple projects would make it possible to convert one at a time and isolate breaking changes if something gets converted wrong.
also will depend on the style of the vb coders work. i tended to use vb.net where most of my code was the .net base objects and not the vb "versions" of them so that would make it more direct to convert.
but if someone used a lot of the "vb-isms" then you have more stuff to sort out.
in general i would say if it's not broke then leave it as is. at least for now... just use any vb dlls as .net dlls and move on.
figuerres said:can be done, yes... but it will take a lot of time to go thru all that code...
is it one dll / exe or is it multiple projects in one solution ?
multiple projects would make it possible to convert one at a time and isolate breaking changes if something gets converted wrong.
also will depend on the style of the vb coders work. i tended to use vb.net where most of my code was the .net base objects and not the vb "versions" of them so that would make it more direct to convert.
but if someone used a lot of the "vb-isms" then you have more stuff to sort out.
in general i would say if it's not broke then leave it as is. at least for now... just use any vb dlls as .net dlls and move on.
If you search for 'convert vb.net to csharp -online' then there seem to be plenty of converters.
Alternatively could you write a utility to compile the VB.NET in memory and them emit it as C# code? I'm fairly sure I remember the compiler stuff is all built-in to the framework ...
Herbie
Besides being in VB, what's wrong with the code? Because if that's the only thing wrong with the code, I wouldn't recommend rewriting it.
joechung said:Besides being in VB, what's wrong with the code? Because if that's the only thing wrong with the code, I wouldn't recommend rewriting it.
I don't like VB, and tbh it will f**k with my mind to go back and forward from VB and C# so often.
I see there is a lot of very good ways to convert this though.
Bass said:joechung said:*snip*I don't like VB, and tbh it will f**k with my mind to go back and forward from VB and C# so often.
I see there is a lot of very good ways to convert this though.
30K lines of code is not that much, you could do it in a few days maybe , but if the only reason is because "you vastly perfer C#" I don't think it would be wise
Ion Todirel said:Bass said:*snip*30K lines of code is not that much, you could do it in a few days maybe , but if the only reason is because "you vastly perfer C#" I don't think it would be wise
30,000 lines in a few days? ha!
You're better of rewriting it sections as the project advances... assuming the software was engineered right in the first place (i.e. loose-coupling, strong cohesion, etc).
W3bbo said:Ion Todirel said:*snip*30,000 lines in a few days? ha!
You're better of rewriting it sections as the project advances... assuming the software was engineered right in the first place (i.e. loose-coupling, strong cohesion, etc).
I'd say batch-convert with a tool and then refator it into shape if necessary, but I guess that is all subjective.
That is, if you absolutely can't cope with referencing a VB.NET project ...
Herbie
Visual Studio itself has its built in Utility, by which you can convert the VB.NET project to C# Project, but you will find the refrence issue, but its better to use this approach as in fixing the issue, you will also have your hand on the code.
Give VB a chance. Maybe in a couple of weeks you'll be asking how to convert your C# to VB. ![]()
spivonious said:Give VB a chance. Maybe in a couple of weeks you'll be asking how to convert your C# to VB.
hardly ![]()
W3bbo said:Ion Todirel said:*snip*30,000 lines in a few days? ha!
You're better of rewriting it sections as the project advances... assuming the software was engineered right in the first place (i.e. loose-coupling, strong cohesion, etc).
Yeah... 30,000 lines of VB is what...? 200 lines of C#? ![]()
You Traitor
You Heathen.
Sacrifice Him on the Alter of REM
30,000 line is that excluding emtpy lines and comments.
Minh said:W3bbo said:*snip*Yeah... 30,000 lines of VB is what...? 200 lines of C#?
...You do not want to upset Beth Massi
msftwise said:Minh said:*snip*...You do not want to upset Beth Massi
No, I don't haha!
Let me be on the record to say I think VB is more innovative, user-friendly than C#...
Personally I think its sloppy, esp more recently.
stevo_ said:Personally I think its sloppy, esp more recently.
What do you mean by "its slopply"?
AdamSpeight2008 said:stevo_ said:*snip*What do you mean by "its slopply"?
As a point, I make sure that all posts in my blog are in both C# and VB. If you really take the time to write a program in both C# and VB, you will find that the only "sloppy" thing is your attitude towards it.
When searching through code on MSDN I don't really notice what language the program is written in. With syntax highlighting in Dev 10 and the fact that Anders is now in charge of both languages, means a lot of people are missing the point.
I always tend to find this attitude in younger developers. All the old curmudgeons I work with program in C++, C# or VB. The younger developers can only see things from one (not so sharp) angle.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.