473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Comment from MS on Microsoft.VisualBasic usage?

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
2 2083
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
* 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: darrel | last post by:
I've built a control. At the top of my control, I have this: Imports Microsoft.VisualBasic Then, later, I call a function like this: DateTime.Now.Year.ToString() This works fine on my...
15
by: Phill. W | last post by:
Is anyone writing VB.Net (2003) code /without/ referencing the Microsoft.VisualBasic namespace(?), regardless of whether its Import'ed or not? The Powers That Be here are trying to introduce a...
14
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the...
7
by: Dale Beane | last post by:
When I try to run a program in the debugger I get the following error message. Any help? 'Microsoft.VisualBasic.Left' is not declared or the module containing it is not loaded in the debugging...
9
by: Alexander Baranovsky | last post by:
Hello friends, How I can determine full path of Microsoft.Basic.dll? Thanks, Alexander
8
by: Dave | last post by:
I'm trying to import Microsoft.VisualBasic to use the IsNumeric function in my C# code but all I see is: Microsoft.VisualBasic.VBCodeProvider while using Intellisense... From samples shouldn't...
1
by: Tom Kearney | last post by:
Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListener" from a set of C# aspx web pages, but I can't seem to use: <%@ Import Namespace="Microsoft.VisualBasic.Logging" %> I...
6
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have two questions with regards to the LEFT function. I ran into a problem with the LEFT function today. I knew it was a valid Function, but when I tried to use it, it was getting interpreted...
32
by: Greg | last post by:
I know I can use the Microsoft.VisualBasic.Left function to get the left portion of a string, but I would prefer to avoid using any Microsoft.VisualBasic namespace items. What is the equivilant in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.