Performing the raw conversion from VB6 to VB.NET. Do the following steps for the raw conversion: Start Visual Studio 2008 (VB2008). Click the File menu, click Open, then click Convert. The Convert dialog box appears. On the Convert dialog box, choose the Visual Basic 2008 Upgrade Wizard and click OK. Convert VB to C# (or vice-versa) Sep 27, 2010 Jun 21, 2013 admin.NET, C#, Visual Basic If you’ve ever found the perfect code sample to use in a project, but found it was written in C# and you need VB.NET or vice-versa, there are several quick, free, easy tools you can use to do your translation for you (assuming you are not bi-lingual.
How do you translate this block of code (on visual basic) to c#
I can't find the union method simply by doing this:
closed as not constructive by Sergey Berezovskiy, John Conde, Kevin, mgibsonbr, nathan gonzalezOct 25 '12 at 3:33
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.
3 Answers
For the code:
This is an array in VB.NET - it's a single element array, but still an array. So the corresponding C# code would be:
The rest of your LINQ expressions should work from there.
I am not sure how effective these tools are as I hardly have to do this sort of thing. But you can give it a try http://www.developerfusion.com/tools/convert/vb-to-csharp/
You don't need to use the Union in C#. For instance, I can create an anonymous type like this:
Not entirely sure this is what you're looking for, but I hope this helps.