By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,143 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,143 IT Pros & Developers. It's quick & easy.

Comment from MS on Microsoft.VisualBasic usage?

P: n/a
Having only recently migrated across from VB6 to VB.NET I'm still
unsure whether or not I should be making (heavy) use of the
Microsoft.VisualBasic namespace in new applications. I've read a lot
of posts in the (VB).Net newsgroups and seen just about all of the For
and Against arguments i.e. not using it = not coding in VB.NET, not
using it = good OO. I'm also aware of the difference between this
namespace and the compatibility namespace.

Has there been any official comment or guidelines posted by MS on
whether or not it is good or bad practise to use this namespace?

I did find one comment in a chat transcript from Stephen Weatherford
of the Visual Basic development team:

----------

http://msdn.microsoft.com/chats/vstu...dio_060303.asp

Q: Re: the question, "There are two VB namespaces, right?
Compatibility and regular VB?"

A: Let me add to this... There *are* two
namespaces--Microsoft.VisualBasic and
Microsoft.VisualBasic.Compatibility.
Microsoft.VisualBasic.Compatibility is only used when you upgrade a
VB6 application, and is for backwards compatibility purposes (it is a
separate DLL from Microsoft.VisualBasic.dll). The
Microsoft.VisualBasic namespace, however, provides the runtime
functions for Visual Basic. As Cameron pointed out, you always get
this reference for free (it is different from the VB compatibility
runtime). It is *not* for backwards compatibility, but rather for
current Visual Basic .NET programs.

----------

This leads me to believe that there is no issue with me contuining to
use the VB functions I am familiar with.

Does anyone else have links to any other comments or postings by MS?
Or hopefully there is someone from MS monitoring this newsgroup that
can put my mind at rest once and for all.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I think this is what you are looking for:
http://msdn.microsoft.com/library/de...tinternals.asp

Quote:
The Visual Basic 6.0 Compatibility library is distinct from the Visual Basic
Runtime. The Microsoft.VisualBasic.Compatibility namespace is used by the
tools that upgrade Visual Basic 6.0 code to Visual Basic .NET. It is a
bridge to support Visual Basic 6 features that are not directly supported by
the .NET implementation of Visual Basic. Unlike the Visual Basic Runtime,
the compatibility library is not implicitly referenced by all Visual Basic
..NET applications. When you upgrade a Visual Basic 6 project to Visual Basic
..NET, the upgrade wizard adds a reference to
Microsoft.VisualBasic.Compatibility.

The compatibility classes should not be used for new development. The
Microsoft.VisualBasic.Compatibility namespace adds a layer of complexity to
your Visual Basic .NET application and introduces some minimal performance
costs that could be eliminated by recoding portions of the application. In
addition, the Compatibility namespace often contains many classes that wrap
COM objects, and as stated earlier, depending on COM objects is not as
optimal as a pure managed implementation. However, the library itself is not
overly inefficient and the performance costs will probably not be noticeable
in most applications. The rest of this section highlights a few prevalent
Visual Basic 6 compatibility features and their performance characteristics.
--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan

"Steve" <st***********@yahoo.co.uk> schreef in bericht
news:9b**************************@posting.google.c om...
Having only recently migrated across from VB6 to VB.NET I'm still
unsure whether or not I should be making (heavy) use of the
Microsoft.VisualBasic namespace in new applications. I've read a lot
of posts in the (VB).Net newsgroups and seen just about all of the For
and Against arguments i.e. not using it = not coding in VB.NET, not
using it = good OO. I'm also aware of the difference between this
namespace and the compatibility namespace.

Has there been any official comment or guidelines posted by MS on
whether or not it is good or bad practise to use this namespace?

I did find one comment in a chat transcript from Stephen Weatherford
of the Visual Basic development team:

----------

http://msdn.microsoft.com/chats/vstu...dio_060303.asp

Q: Re: the question, "There are two VB namespaces, right?
Compatibility and regular VB?"

A: Let me add to this... There *are* two
namespaces--Microsoft.VisualBasic and
Microsoft.VisualBasic.Compatibility.
Microsoft.VisualBasic.Compatibility is only used when you upgrade a
VB6 application, and is for backwards compatibility purposes (it is a
separate DLL from Microsoft.VisualBasic.dll). The
Microsoft.VisualBasic namespace, however, provides the runtime
functions for Visual Basic. As Cameron pointed out, you always get
this reference for free (it is different from the VB compatibility
runtime). It is *not* for backwards compatibility, but rather for
current Visual Basic .NET programs.

----------

This leads me to believe that there is no issue with me contuining to
use the VB functions I am familiar with.

Does anyone else have links to any other comments or postings by MS?
Or hopefully there is someone from MS monitoring this newsgroup that
can put my mind at rest once and for all.

Nov 20 '05 #2

P: n/a
* st***********@yahoo.co.uk (Steve) scripsit:
Having only recently migrated across from VB6 to VB.NET I'm still
unsure whether or not I should be making (heavy) use of the
Microsoft.VisualBasic namespace in new applications. I've read a lot
of posts in the (VB).Net newsgroups and seen just about all of the For
and Against arguments i.e. not using it = not coding in VB.NET, not
using it = good OO. I'm also aware of the difference between this
namespace and the compatibility namespace. [...] This leads me to believe that there is no issue with me contuining to
use the VB functions I am familiar with.


ACK. You can still use them, sometimes there are not even replacements
for these functions in the .NET Framework. They are handy shortcuts. I
don't have any information from Microsoft about that, but the facts show
that Microsoft made a distinction between the
"Microsoft.VisualBasic.dll" and
"Microsoft.VisualBasic.Compatibility.dll". The latter may be removed in
future, the Visual Basic Runtime Library will remain.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.