[mono-vb] Microsoft.VisualBasic namespace

A Rafael D Teixeira rafael.teixeirabr@terra.com.br
Mon, 07 Jun 2004 10:31:56 -0300

On Mon, 2004-06-07 at 07:12, Jochen Wezel wrote:
> Hi Rafael/Anirban,
> Here is a small test file which can compile with VBC but not with
> Priority: low
> imports System
> class ebbes
> shared sub Main()
>         Console.WriteLine(Microsoft.VisualBasic.Strings.ChrW(89))
> 'works fine :)
>         Console.WriteLine(Microsoft.VisualBasic.ChrW(89)) 'how MS did
> it??? Is it a just-in-time-wrapping in the compiler of a defined list
> of methods to another namespace/module, in this case Strings.ChrW?

In truth as Strings is a vb "Module" it is normally ommited, because all
methods/properties/fields defined in them are static and given global
visibility where the namespace is available. I've been working on this
bug and resolved the most part of it, but I could not make it work for
this specific case when the method is just semi-qualified with just the
namespace. That is why the corresponding bugzilla case is still open.
Most people won't experience the problem because normally they would
write just


This also works fine and is how people see it in VisualStudio, because
Microsoft.VisualBasic assembly and namespace are automatically
referenced and imported through command-line options.

In mono your makefile have to do what VS.NET does when calling vbc.

mbas /r:Microsoft.VisualBasic /imports:Microsoft.VisualBasic *.vb

I'm working on it, but I'm not sure if it will make for 1.0...

Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/