Re: VB.NET CF MVPs?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



> 2. code conversion sites are about 60-90% correct - with the other %

I'm not an MVP, but hopefully it's ok that I join in :).

I've used the code and conversion sites on a number of occasions when I
had to convert code because I was porting code into an assembly in a
given language, and you're right--they're about 60-90% correct,
depending on the complexity. A better approach that I have been using
recently is the combination of Lutz Roeder's .NET Reflector (an
indispensible tool, IMHO) and the Denis Bauer's Disassembler plugin.
This takes the compiled IL and disassembles it into the language of
your choice. It's quite useful for looking at the internals of the
..NET Framework classes :). Here are the URL's:

http://www.aisto.com/roeder/dotnet/
http://www.denisbauer.com/NETTools/FileDisassembler.aspx

Overall, I would echo what those above have written--it pays to be
fluent in both. In my most recent project, I've been coding in both C#
and VB. I used C# for my custom controls (since I had too, but also
because I prefer C#...) and VB for everything else, since my company is
a VB.NET shop. I made frequent syntax errors, but those were easily
fixed in no time.

My single biggest gripe about VB vs. C# is array declaration. In C# it
makes sense (and is like C++ and Java)....but in VB, what the heck were
they thinking? 0-based, but declared with the highest index rather
than the length? That has been the single biggest pain of working with
VB, especially when I convert C# code and forget to make that change
and don't find out until I discover a runtime bug...


Harry Simpson wrote:
> Peter,
>
> Think you've touched on a couple of great points:
> 1. messing between the two tends to cause syntactical screw-ups
> 2. code conversion sites are about 60-90% correct - with the other %
> leaving you wondering if the code is translation is whacked or the original
> code is not used correctly...that's why I'd rather see my own language's
> code used for samples etc - especially in areas where I'm not familiar with
> the classes anyway.
>
> Really wish our company would just go to C# for the next gig and then I
> could more easily consume the samples....but for now I'll follow Chris's
> advice and learn to read C# more fluently.
>
> Thanks
> Harry
>
> "Peter Foot [MVP]" <feedback@xxxxxxxxxxxxxxxxxxxx> wrote in message
> news:er3VwwQpFHA.320@xxxxxxxxxxxxxxxxxxxxxxx
> >I try to strike a balance between the two, but as you can imagine it's not
> >always fun writing everything twice and my preferred language is C# but I
> >probably write about 50% of code in VB, and it's always when switching from
> >one to another that I end up making the usual coding errors, adding
> >semi-colons in vb or typing private sub... in C#
> > :-)
> >
> > It's fairly easy to learn to read both even if you prefer to develop with
> > one, such a high percentage of code you see will be calling methods on
> > framework classes and apart from minor things like semi-colons and []
> > versus () for indexers there is little visible difference. There are a
> > number of sites which will attempt to automatically convert code back and
> > forth, though the results generally need a little massaging
> > occasionally...
> >
> > Peter
> >
> > --
> > Peter Foot
> > Windows Embedded MVP
> > www.inthehand.com | www.peterfoot.net
> >
> > "Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
> > news:e9vqadQpFHA.1148@xxxxxxxxxxxxxxxxxxxxxxx
> >> So really no dev blogs leaning more toward VB.NET by MVPs.....I reakon I
> >> need to be familiar enough with C# to be able to flip back and forth
> >> syntactically...
> >>
> >> Thanks for the responses.
> >>
> >> Harry
> >>
> >> "Harry Simpson" <hssimpson@xxxxxxxx> wrote in message
> >> news:e23L0dOpFHA.3376@xxxxxxxxxxxxxxxxxxxxxxx
> >>> Hi Dick,
> >>>
> >>> I'm using your Serial control which works great....since 2002
> >>> actually!!...
> >>> Nothing specific...I've seen several programming blogs by CF MVPs and
> >>> all the code is C# which I can see what's going on but it still requires
> >>> translation if that's not what you're used to seeing.
> >>>
> >>> Thanks for the response. Gee whiz it's quiet in here! <g>
> >>>
> >>> Harry
> >>>
> >>> "Dick Grier" <dick_grierNOSPAM@xxxxxxx> wrote in message
> >>> news:uqKw2GNpFHA.3512@xxxxxxxxxxxxxxxxxxxxxxx
> >>>> Harry,
> >>>>
> >>>> I write most of my code in VB (95%?), but I use the C# examples fairly
> >>>> frequently. I don't blog, though. Do you have some specific
> >>>> questions -- I might or might not be able to help.
> >>>>
> >>>> Dick
> >>>>
> >>>> --
> >>>> Richard Grier (Microsoft Visual Basic MVP)
> >>>>
> >>>> See www.hardandsoftware.net for contact information.
> >>>>
> >>>> Author of Visual Basic Programmer's Guide to Serial Communications, 4th
> >>>> Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
> >>>> www.mabry.com/vbpgser4 to order.
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >
> >

.



Relevant Pages

  • Re: how can I remove hyperlinks from text copied from the web?
    ... I think you and Peter just need a beer summit. ... Suzanne S. Barnhill wrote: ... Greg Maxey - Word MVP ...
    (microsoft.public.word.docmanagement)
  • Re: security centre unavailable
    ... > "Peter" wrote: ... >> Toronto, Canada. ... >> In memory of MVP, Alex Nichol ...
    (microsoft.public.windowsxp.security_admin)
  • Re: VB.NET CF MVPs?
    ... Windows Embedded MVP ... >> I'm using your Serial control which works great....since 2002 ... >> Nothing specific...I've seen several programming blogs by CF MVPs and all ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: httpmodule causes VS.NET to refuse to open solution!
    ... I'll exclude replied messages and those originating from Peter Row on ... Alvin Bruney [ASP.NET MVP] ... > even read the original post in a thread of 1 message any way. ... > So this response that I'm replying to, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: httpmodule causes VS.NET to refuse to open solution!
    ... I'll exclude replied messages and those originating from Peter Row on ... Alvin Bruney [ASP.NET MVP] ... > even read the original post in a thread of 1 message any way. ... > So this response that I'm replying to, ...
    (microsoft.public.dotnet.framework.aspnet)