Re: Cannot add microsoft.visualbasic as reference - newbie ?



Tim A wrote:
If microsoft.visualbasic is automatically referenced by the project system why can't I reference the classes within without typing "microsoft.visualbasic.right(string,int)" instead of "right(string,int)".

Microsoft.VisualBasic /is/ automatically referenced by the Visual Studio IDE (and used "under the covers" as well) and, usually, automatically Imported as well - have a rummage around the Project Properties; there's a list of "automatic" Imports in there somewhere.

I use a number of these (classes?) from microsoft.visualbasic in my coding including "err", "right", etc. Am I doing this the wrong way?

IMHO, if you are maintaining or struggling to "upgrade" existing code, then No; you're doing things the /right/ way sticking with the compatible functions.

If you are writing new code from scratch, then /perhaps/ not. The methods available on the String class, while more "fiddly" than those in MS.VB, are a better way forward and Structure Exception Handling (Try .. Catch) just leaves "On Error Goto" standing ...

HTH,
Phill W.
.



Relevant Pages

  • Re: Winsock Woes - solved
    ... but as Reference into a VB-Project. ... If I remember correctly it can be gotten to work in the IDE ... Ah Ok, sorry ...somehow guessed (whilst typing), that there ...
    (microsoft.public.vb.controls)
  • Re: database project
    ... There are two different DB reference in VS 2005 IDE. ... each connection is encrypted and stored on local for each ... The .dbp file is the Database Project file. ...
    (microsoft.public.vsnet.ide)
  • Re: Problem with referenced projects
    ... The "Could Not Copy Temporary Files to the Output Directory" Error Is ... And ervery reference has the property "Locale ... > same executing directory. ... > To temporally resolve the problem, i have to shutdown the IDE delete all ...
    (microsoft.public.vsnet.ide)
  • Re: New Bootloader
    ... top level link for reference ... infrastructure of a BSP for a starting point. ... get the IDE to open a build window for you. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: OLE Automation
    ... Hi Tim. ... just add a reference to your project. ... > applications that only support OLE interfaces. ...
    (microsoft.public.dotnet.framework.interop)