Does VB 2005 have full access to the framework?

  • Thread starter Thread starter clarence_rollins
  • Start date Start date
C

clarence_rollins

I've read that the framework is completely accessible to c#.

Is that true for VB? If not, what parts of the framework are not accessible
to VB?
 
clarence_rollins said:
I've read that the framework is completely accessible to c#.

Is that true for VB? If not, what parts of the framework are not
accessible
to VB?

It's completely accessible to VB 2005 too, as it has been since VB.NET 2002.
 
I asked the question (which I should have included with my original post)
because I am moving from VB6 to either c# or VB. Some of the reasons I've
heard for moving to c# instead of VB are: more income, better employment
opportunities, complete access to the framework, elegant syntax and
professional respect.

For me, the first three reasons are compelling enough to study c# instead of
VB.
 
clarence_rollins said:
I asked the question (which I should have included with my original post)
because I am moving from VB6 to either c# or VB. Some of the reasons I've
heard for moving to c# instead of VB are: more income, better employment
opportunities, complete access to the framework, elegant syntax and
professional respect.

For me, the first three reasons are compelling enough to study c# instead of
VB.

-elegant syntax?
That is completely a matter of opinion and in mine, it's incorrect.

-more income, better employmentopportunities
Just look at the job boards, there isn't a difference.

-complete access to the framework
False

-professional respect
False, They do they exact same thing, it's just what syntax you know.
 
As a long time VB programmer (10 years) and a C/C++ programmer before that,
I do believe the "C" syntax is sometimes more concise than VB (for instance
I like the intuitive way you cast variables in "C" as oppossed to VB.NET's
CType(...) or DirectCast(...) methods). However, this is not a FUNCTIONAL
difference. In fact, in terms of really functional stuff VB is in a lot of
ways better than C#. One need only look at the sort of declarative way you
can do Event Handling in forms (using Handles keyword) as oppossed to C#'s
awkward overuse of delegates and such (which indeed are also available to
you in VB as well if you want to use them).

But, in the end, really it's a matter of taste I think. If you're a good
disciplined VB coder then you'll love VB.NET. If you still consider yourself
a sort of a lightweight VB programmer and need a little structure imposed on
you then you might want to look at C#.
 
I would also add the multitude of methods available in the VisualBasic
namespace, which duplicate all the classic long standing BASIC statements-
some of which have been around since 1977. For instance, the C# (and indeed
generic .NET) way to retrieve a substring is to use String.Subtring(start,
length) function. However, this is an "Exception-Happy" function... which
throws exceptions for all sorts of things like if the string is smaller than
the length being asked for or hasn't been initialized or whatever.

The classic Left/Mid/Right statements (now in the VisualBasic namespace) on
the other hand are graceful and elegant. Left("smallstr", 30) returns
"smallstr" and doesn't complain that the string is less than 30 characters
long... which is often exactly how you need String.Substring to work.

It's little things like that that C# folks don't miss because they don't
know them. (though even C# users can use the VisualBasic namespace if they
wished or knew about it! ;-) )
 
CMM
However, this is an "Exception-Happy" function...

Nice short description. I'll try to remember it me.

(Although I don't like the MID because my confusion forever between the zero
and one indexer).

I like more things as the IsDate function as sample for that, it creates a
try{
datetime.parse............}
catch{
return error...}
end try

And is much easier to handle than.

:-)

Cor
 
CMM said:
I would also add the multitude of methods available in the VisualBasic
namespace, which duplicate all the classic long standing BASIC statements-
some of which have been around since 1977. For instance, the C# (and indeed
generic .NET) way to retrieve a substring is to use String.Subtring(start,
length) function. However, this is an "Exception-Happy" function... which
throws exceptions for all sorts of things like if the string is smaller
than the length being asked for or hasn't been initialized or whatever.

The classic Left/Mid/Right statements (now in the VisualBasic namespace)
on the other hand are graceful and elegant. Left("smallstr", 30) returns
"smallstr" and doesn't complain that the string is less than 30 characters
long... which is often exactly how you need String.Substring to work.

It's little things like that that C# folks don't miss because they don't
know them. (though even C# users can use the VisualBasic namespace if they
wished or knew about it! ;-) )

Exactly. Some C# developers seem to be proud that they do not have a RAD
function library as VB and VFP have. It seems to me that they have never
used VB or VFP...
 
Herfried,
Exactly. Some C# developers seem to be proud that they do not have a RAD
function library as VB and VFP have. It seems to me that they have never
used VB or VFP...
I know one, who (as far as I remember me) told me once that you are an
amateur if you use the designer part to create a form layout.

(You know him as well).

However C# is of course full of RAD tools, maybe that there are more in
VB.Net however not in the major parts.

Let us not start a C#, VB.Net discussion because some C# or VB.Net
developpers have their own special opinions.

:-)

Cor
 
Cor Ligthert said:
I know one, who (as far as I remember me) told me once that you are an
amateur if you use the designer part to create a form layout.

Well, in general I do not comment on such statements, but I believe that's
completely wrong. Typically the UI design should be completely separated
from the code and professional designers should create the forms instead of
developers. By creating forms directly in the code this separation is lost.
However C# is of course full of RAD tools, maybe that there are more in
VB.Net however not in the major parts.

I believe there are more in VB. Otherwise I'd use C#.
 
Herfried,
I believe there are more in VB. Otherwise I'd use C#.

--
Whatever you do there will never be a "Dim" in C# and you cannot withouth
that.

Just kidding,

:-)

Cor
 
It's completely accessible to VB 2005 too,

Except when it isn't, such as the handful of members that use
pointers.


Mattias
 
I believe there are more in VB. Otherwise I'd use C#.

Maybe... maybe not. When I started using VB.NET several years ago I missed
(a little bit) the VB6 Tools | Add Procedure tool that provided a pretty
face on creating properties and methods and such. Ironically C# has a pretty
advanced version of this tool (in Class Designer right click on a class and
select Add Method, Add Property, etc.)!!! I never understood why VB.NET
didn't have this!

I'm going to go check right now if 2003 has it! I completely forgot about
that thing. :-)
 
CMM said:
I'm going to go check right now if 2003 has it! I completely forgot about
that thing. :-)

Correction... I meant to say 2005....
And it doesn't... though I guess the same functionality is achieved via the
Class Diagram Designer. Still, I kinda liked the C# utilities and still
think they should have been in VB first.
 
Mattias Sjögren said:
Except when it isn't, such as the handful of members that use
pointers.

Although by using the Marshal classes in the framework together with IntPtr
type, even VB.NET can use pointers. :-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top