[Mono-list] Language Clarification

David P. Donahue ddonahue@ccs.neu.edu
Tue, 12 Oct 2004 11:20:49 -0400

I realize that Mono focuses its development on C# as a whole, but I'm
wondering something about other languages in general.  I'm no expert on
the core of .NET, but I was under the impression that one of its
features is that code from any .NET language, when compiled, becomes a
single common language for any .NET interpreter (such as Mono) to use.
That is, if I write something in VB and compile it in Visual Studio, the
end result is no different (not critically different, anyway) from the
end result that would be achieved had I used C# or any other .NET
language.  Is this the case?

If so, then I'm unclear on a problem that I've been having (and have
been receiving very help assistance on, thanks to this mailing list) in
trying to get an ASP .NET web application written in VB to work on Mono.

I was told of a work-around to get my first test page to work, which was
to set the page language to C# even though my code-behind was all in VB.
This worked... for that small test page (which consisted of a button
which, when pressed, changed a property on a label).  My next test was
to use a DataGrid and grab a table from a database.  This page is
slightly more complex as a test, since it has more functions in the
code-behind and has some VB code in the design of the .aspx file itself.
The aforementioned work-around doesn't seem to extend this far, as
setting my page language to C# now results in a vague "object reference
not set to an instance of an object" error (with no obvious mention of
the object in question).  And, of course, setting it back to VB results
in a "thread was being aborted" error that caused the need for the
aforementioned work-around.

If my originally mentioned impression of how .NET works is correct, why
is there a difference between the two at all?  When I compile my
"solution" in Visual Studio, isn't the resulting .dll in the bin folder
contain all that Mono needs?  If so, is my method of compilation not
accomplishing this properly?

For reference, I am using the following setup:
  Windows XP, .NET Framework 1.1.4322, Visual Studio .NET 2003
  Slackware 10.0, Linux 2.4.26, Mono 1.1.1 (mod_mono with Apache 1.3.31)

David P. Donahue