|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Transition from C# to VB.NETIf I already know C#, how long would it take me to learn VB.NET?
"Icon Iconoclast" <icon_iconocl***@h-o-t-m-a-i-l.com> wrote in message In Visual Studio, 1 Day.news:9EA71F7C-A711-4978-991A-0C5B39545AF6@microsoft.com... > If I already know C#, how long would it take me to learn VB.NET? -- Anthony Jones - MVP ASP/ASP.NET "Anthony Jones" <AnthonyWJo***@yadayadayada.com> wrote in message I would give it a week or one project, whichever comes first. There are news:uShWMzQYJHA.4852@TK2MSFTNGP04.phx.gbl... > "Icon Iconoclast" <icon_iconocl***@h-o-t-m-a-i-l.com> wrote in message > news:9EA71F7C-A711-4978-991A-0C5B39545AF6@microsoft.com... >> If I already know C#, how long would it take me to learn VB.NET? > > In Visual Studio, 1 Day. > > -- > Anthony Jones - MVP ASP/ASP.NET > > significant differences in the syntax, but since you already know the framework, the single largest hurdle is gone. I use both and it took me about a week to learn both CO# and VB.NET coming from a CO++/MAC and VIBE background. I'm still finding, after several years, new stuff in the framework. Mike Ober. a Couple of hours....then just hit n miss on some syntax
look at inherit differences For the most part if u know c#, VB. NET is not a problem... Watch them Semi colons Dave Show quoteHide quote "Icon Iconoclast" <icon_iconocl***@h-o-t-m-a-i-l.com> wrote in message news:9EA71F7C-A711-4978-991A-0C5B39545AF6@microsoft.com... > If I already know C#, how long would it take me to learn VB.NET? Just be aware that there are some fairly insiduous gotcha's.
The behavior of the 'Handles' clause in VB is different than the behavior of event wireups in C# (but 'AddHandler' is identical). Integer division: You need to use '\' in VB - otherwise your results will change. Also, if you think the following are equivalent - they're not: C#: VB - not quite: null Nothing (VB's 'Nothing' applies also to value types) typeof TypeOf (C# 'typeof' -> VB 'GetType') is Is (C# 'foo is' -> VB 'TypeOf foo Is') == = (only equivalent for value types) These are just a few, but there are many others... so I think a few hours or days to make the transition is a bit idealistic. You'll be coding VB within a few hours, but you'll be sorting out the syntax nuances for weeks or months. -- Show quoteHide quotehttp://www.tangiblesoftwaresolutions.com C++ to C# C++ to VB C++ to Java VB & C# to Java Java to VB & C# Instant C#: VB to C# Instant VB: C# to VB Instant C++: VB, C#, or Java to C++/CLI "Icon Iconoclast" wrote: > If I already know C#, how long would it take me to learn VB.NET? > One thing that is different in VB is defining arrays.
(1) Dim a As String() = New String(10) {} is not equivalent to (2) String[] a = new String[10]; in c# In VB you specify the last index of the array not the length. So the VB example gives you an array of 11 elements not 10. David Anton wrote: Show quoteHide quote > Just be aware that there are some fairly insiduous gotcha's. > > The behavior of the 'Handles' clause in VB is different than the behavior of > event wireups in C# (but 'AddHandler' is identical). > > Integer division: You need to use '\' in VB - otherwise your results will > change. > > Also, if you think the following are equivalent - they're not: > C#: VB - not quite: > null Nothing (VB's 'Nothing' applies also to > value types) > typeof TypeOf (C# 'typeof' -> VB 'GetType') > is Is (C# 'foo is' -> VB 'TypeOf foo > Is') > == = (only equivalent for value types) > > These are just a few, but there are many others... so I think a few hours or > days to make the transition is a bit idealistic. You'll be coding VB within > a few hours, but you'll be sorting out the syntax nuances for weeks or months. Right - that's one of the most common mistakes when developers are switching
between languages. -- Show quoteHide quotehttp://www.tangiblesoftwaresolutions.com C++ to C# C++ to VB C++ to Java VB & C# to Java Java to VB & C# Instant C#: VB to C# Instant VB: C# to VB Instant C++: VB, C#, or Java to C++/CLI "Jan Obrestad" wrote: > One thing that is different in VB is defining arrays. > > (1) Dim a As String() = New String(10) {} > > is not equivalent to > > (2) String[] a = new String[10]; > > in c# > > In VB you specify the last index of the array not the length. So the VB > example gives you an array of 11 elements not 10. > > > > > > > David Anton wrote: > > Just be aware that there are some fairly insiduous gotcha's. > > > > The behavior of the 'Handles' clause in VB is different than the behavior of > > event wireups in C# (but 'AddHandler' is identical). > > > > Integer division: You need to use '\' in VB - otherwise your results will > > change. > > > > Also, if you think the following are equivalent - they're not: > > C#: VB - not quite: > > null Nothing (VB's 'Nothing' applies also to > > value types) > > typeof TypeOf (C# 'typeof' -> VB 'GetType') > > is Is (C# 'foo is' -> VB 'TypeOf foo > > Is') > > == = (only equivalent for value types) > > > > These are just a few, but there are many others... so I think a few hours or > > days to make the transition is a bit idealistic. You'll be coding VB within > > a few hours, but you'll be sorting out the syntax nuances for weeks or months. >
Other interesting topics
Suggestion for C# language: Modification to the "new" keyword - Allow type inference in C# to use th
Initializing form (dialog) Referencing object properties Dynamically add property values Dynamically adding Sql type to a parameter Stack in launch Would a string instance become a value type if it was a member of a struct? Filtering a XmlNodeList A dialog in a different thread than its parent? a simple linq query |
|||||||||||||||||||||||