.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C# 2005 vs VB.NET 2005

13 REPLIES 13
Reply
Message 1 of 14
Anonymous
273 Views, 13 Replies

C# 2005 vs VB.NET 2005

can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
13 REPLIES 13
Message 2 of 14
Anonymous
in reply to: Anonymous

The language differences that do exist are fairly minor (e.g., "using" in
C#), the choice is pretty much one of preference. VB.NET and C# have some
different high-level goals, but I suspect many of those things don't apply
as much when using the .NET wrappers with AutoCAD.

If you're currently using VBA with AutoCAD, you'll probably like VB.NET
better. If you've been doing a lot of ObjectARX development, you'll
probably like C# (or C++/CLI) instead.

Dan

"Bob" wrote in message
news:5313143@discussion.autodesk.com...
can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
Message 3 of 14
NathTay
in reply to: Anonymous

The Using Keyword has been introduced into VB.NET 2005.
I remember seeing a comparison of the languages features on the Microsoft site but can't find it anymore.

Regards - Nathan
Message 4 of 14
Anonymous
in reply to: Anonymous

Although originally, they were the same, 2005 has made strides
to put them in their own place. VB.net 2005 is more like VB6,
i.e. "Edit and Continue" although available in both this was driven
by VB and only added to C# at the last minute.

Next time you're in "Borders" or such check out ".Net Components
2nd Edition" by Juval Lowy. He gives a great description of the
two languages and their many differences in 2005. Basically he
equates VB to the quick and dirty RAD environment of VB6, and
C# to the contemplative "Enterprise" language of C++. You know
they way they should be... 🙂

"Bob" wrote in message
news:5313143@discussion.autodesk.com...
can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
Message 5 of 14
Anonymous
in reply to: Anonymous

thanks for the replies.

does C# offer a way to do things that VB.net cannot do?

does C# offer a performance advantage?

i'm really not looking for specific syntax differences but more about
whether one offers functionality that the other does not.

i realize they both use the .net framework class lib but is there really any
advantage [in so far as what can be accomplished] to C# as opposed to
VB.net?


"Paul Richardson" wrote in message
news:5313592@discussion.autodesk.com...
Although originally, they were the same, 2005 has made strides
to put them in their own place. VB.net 2005 is more like VB6,
i.e. "Edit and Continue" although available in both this was driven
by VB and only added to C# at the last minute.

Next time you're in "Borders" or such check out ".Net Components
2nd Edition" by Juval Lowy. He gives a great description of the
two languages and their many differences in 2005. Basically he
equates VB to the quick and dirty RAD environment of VB6, and
C# to the contemplative "Enterprise" language of C++. You know
they way they should be... 🙂

"Bob" wrote in message
news:5313143@discussion.autodesk.com...
can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
Message 6 of 14
Anonymous
in reply to: Anonymous

Since they both come with VS2005, why not just
try them both. They both have tools that the other
does not. If you're just getting started than VB is
probably for you, nor will the advanced C# tools
be needed right away. Get a good book! Also, it's
no coincidence that good coders are also good
researchers. Many other groups/websites/books
have answerd these questions related to .net. I would
start there and then you get to make your own
decision instead relying on our opinions. Best thing
to do is learn the .net framework and start coding.

As far as speed goes, I haven't played with VB.net
but I know how I would test it if I need to know.

"Bob" wrote in message
news:5313896@discussion.autodesk.com...
thanks for the replies.

does C# offer a way to do things that VB.net cannot do?

does C# offer a performance advantage?

i'm really not looking for specific syntax differences but more about
whether one offers functionality that the other does not.

i realize they both use the .net framework class lib but is there really any
advantage [in so far as what can be accomplished] to C# as opposed to
VB.net?


"Paul Richardson" wrote in message
news:5313592@discussion.autodesk.com...
Although originally, they were the same, 2005 has made strides
to put them in their own place. VB.net 2005 is more like VB6,
i.e. "Edit and Continue" although available in both this was driven
by VB and only added to C# at the last minute.

Next time you're in "Borders" or such check out ".Net Components
2nd Edition" by Juval Lowy. He gives a great description of the
two languages and their many differences in 2005. Basically he
equates VB to the quick and dirty RAD environment of VB6, and
C# to the contemplative "Enterprise" language of C++. You know
they way they should be... 🙂

"Bob" wrote in message
news:5313143@discussion.autodesk.com...
can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
Message 7 of 14
Anonymous
in reply to: Anonymous

You can successfully use the .NET wrapper classes to create "managed ARXs"
for AutoCAD with either language.

Each language has various strengths and weaknesses, but I don't think there
is anything of significance to creating managed ARXs that one language can
do that the other can't. The same is not true for C++/CLI; with that
language you get the best of both worlds: native C++ for custom objects with
easy access to the .NET framework.

Dan

"Bob" wrote in message
news:5313896@discussion.autodesk.com...
thanks for the replies.

does C# offer a way to do things that VB.net cannot do?

does C# offer a performance advantage?

i'm really not looking for specific syntax differences but more about
whether one offers functionality that the other does not.

i realize they both use the .net framework class lib but is there really any
advantage [in so far as what can be accomplished] to C# as opposed to
VB.net?


"Paul Richardson" wrote in message
news:5313592@discussion.autodesk.com...
Although originally, they were the same, 2005 has made strides
to put them in their own place. VB.net 2005 is more like VB6,
i.e. "Edit and Continue" although available in both this was driven
by VB and only added to C# at the last minute.

Next time you're in "Borders" or such check out ".Net Components
2nd Edition" by Juval Lowy. He gives a great description of the
two languages and their many differences in 2005. Basically he
equates VB to the quick and dirty RAD environment of VB6, and
C# to the contemplative "Enterprise" language of C++. You know
they way they should be... 🙂

"Bob" wrote in message
news:5313143@discussion.autodesk.com...
can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
Message 8 of 14
Anonymous
in reply to: Anonymous

it sounds as though everyone is saying language does not matter. C# does not
offer any functionality or performance advantages over VB.net?


"J. Daniel Smith" wrote in message
news:5314071@discussion.autodesk.com...
You can successfully use the .NET wrapper classes to create "managed ARXs"
for AutoCAD with either language.

Each language has various strengths and weaknesses, but I don't think there
is anything of significance to creating managed ARXs that one language can
do that the other can't. The same is not true for C++/CLI; with that
language you get the best of both worlds: native C++ for custom objects with
easy access to the .NET framework.

Dan

"Bob" wrote in message
news:5313896@discussion.autodesk.com...
thanks for the replies.

does C# offer a way to do things that VB.net cannot do?

does C# offer a performance advantage?

i'm really not looking for specific syntax differences but more about
whether one offers functionality that the other does not.

i realize they both use the .net framework class lib but is there really any
advantage [in so far as what can be accomplished] to C# as opposed to
VB.net?


"Paul Richardson" wrote in message
news:5313592@discussion.autodesk.com...
Although originally, they were the same, 2005 has made strides
to put them in their own place. VB.net 2005 is more like VB6,
i.e. "Edit and Continue" although available in both this was driven
by VB and only added to C# at the last minute.

Next time you're in "Borders" or such check out ".Net Components
2nd Edition" by Juval Lowy. He gives a great description of the
two languages and their many differences in 2005. Basically he
equates VB to the quick and dirty RAD environment of VB6, and
C# to the contemplative "Enterprise" language of C++. You know
they way they should be... 🙂

"Bob" wrote in message
news:5313143@discussion.autodesk.com...
can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
Message 9 of 14
Anonymous
in reply to: Anonymous

For a particular individual, language does matter. You'll likely get
significantly more (and perhaps better) information on your questions
elsewhere. Many of the participants in this newsgroup have more-or-less
already decided which .NET language(s) they want to use for developing
AutoCAD applications using the .NET API wrappers.

Personally, I (much) prefer C# (or C++/CLI) over VB.NET; but that's mostly
because I know C++. There are also tools available that use .NET reflection
to do a (what can be a somewhat crude) translations between VB.NET and C#.

Dan

"Bob" wrote in message
news:5314615@discussion.autodesk.com...
it sounds as though everyone is saying language does not matter. C# does not
offer any functionality or performance advantages over VB.net?


"J. Daniel Smith" wrote in message
news:5314071@discussion.autodesk.com...
You can successfully use the .NET wrapper classes to create "managed ARXs"
for AutoCAD with either language.

Each language has various strengths and weaknesses, but I don't think there
is anything of significance to creating managed ARXs that one language can
do that the other can't. The same is not true for C++/CLI; with that
language you get the best of both worlds: native C++ for custom objects with
easy access to the .NET framework.

Dan

"Bob" wrote in message
news:5313896@discussion.autodesk.com...
thanks for the replies.

does C# offer a way to do things that VB.net cannot do?

does C# offer a performance advantage?

i'm really not looking for specific syntax differences but more about
whether one offers functionality that the other does not.

i realize they both use the .net framework class lib but is there really any
advantage [in so far as what can be accomplished] to C# as opposed to
VB.net?


"Paul Richardson" wrote in message
news:5313592@discussion.autodesk.com...
Although originally, they were the same, 2005 has made strides
to put them in their own place. VB.net 2005 is more like VB6,
i.e. "Edit and Continue" although available in both this was driven
by VB and only added to C# at the last minute.

Next time you're in "Borders" or such check out ".Net Components
2nd Edition" by Juval Lowy. He gives a great description of the
two languages and their many differences in 2005. Basically he
equates VB to the quick and dirty RAD environment of VB6, and
C# to the contemplative "Enterprise" language of C++. You know
they way they should be... 🙂

"Bob" wrote in message
news:5313143@discussion.autodesk.com...
can someone please explain what [if any] advantages C# 2005 has over VB.NET
2005. I have read in several articles that there is not enough of a
difference between the two to necessarily consider one over the other
especially with the new 2005 versions.
Message 10 of 14
dmarcotte4
in reply to: Anonymous

With C# you can use unsafe

unsafe class Class1
{
//you can use pointers here!
}

class Class1
{
//pointer
unsafe int * ptr;
unsafe void MyMethod()
{
//you can use pointers here
}
}

static void Main()
{
//can't use pointers here

unsafe
{
//you can declare and use pointer here

}
//can't use pointers here
}

other than this it all boils down to almost identical IL code
although I have read articles the VB.NET still uses a legacy runtime
and in some cases the IL code might be slightly longer hence more
to execute

ps I like C# coming from Lisp
Message 11 of 14
Anonymous
in reply to: Anonymous

One of the smaller "niceties" in C# over VB.NET is case sensitivity. Here's an example:

// stores the first name
private string firstName = "";

// gets or sets the first name property
public string FirstName
{
get { return firstName; }
set { firstName = value; }
}

Ya can't do that in VB 😉
Message 12 of 14
cgay
in reply to: Anonymous

Use whichever .NET language you want. Make your own decision based on research and personal preference.

There is quite a large list of languages to choose from for .NET
Somewhere greater than 50.
http://www.dotnetpowered.com/languages.aspx

I like both VB and C#. I use both. They each solve similar problems in slightly different ways.

As far as VB using legacy code, I believe that the real story (please verify this for yourself) is that some of the functions in the VB namespace produce less than optimal IL than their .NET equivalent functions (not sure which ones, but rest assured it IS managed code, not legacy unmanaged code). Other functions produce the exact same IL because they just call into the .NET function(s). Either way it doesn't matter. Just use the .NET Framework methods in the BCL and all is well.

As far as "niceties" I like the VB ‘MY’ namespace.

And you could do this in VB instead:

' stores the first name
Private m_firstName = String.Empty

' gets or sets the first name property
Public Property FirstName() As String
Get
Return m_firstName
End Get
Set(ByVal value As String)
m_firstName = value
End Set
End Property

Still just as concise as your example. 🙂

Regards,
C
Message 13 of 14
Anonymous
in reply to: Anonymous

' stores the first name
Private m_firstName = String.Empty

Yes, you could, but now in intellisense, you have a bunch of variables starting with m_. Extra typing.
Message 14 of 14
MarkPendergraft
in reply to: Anonymous

Bob, i think you said it yourself. You've read in several articles that there isn't enough of a difference between the two to consider one over the other.
So here is my advice. Whichever one you are more familiar with, go with it. When you feel really comfortable with it, check out the other one. I'm sure you will find that they really aren't that different. It's just like AutoCAD, typically there is one answer for every problem, but at least 2 ways to get there. the way you feel most comfortable with will be the fastest.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost