Hi,

> The following simple code (first steps in Mono VB!) builds but fails
> with
> this Application output.
> 
> Unhandled Exception: System.InvalidProgramException: Invalid IL code in
> Application:Main (): IL_000c: ldarg.0
> 
> @@@ code starts here @@@
> ' Application.vb created with MonoDevelop
> ' User: (etc)
> '
> ' To change standard headers go to Edit->Preferences->Coding->Standard
> Headers
> '
> Public Class Application
>       Public Shared Sub Main()
>         dim g_PossMoves as typ_Move
>         dim xx as integer
>               xx = 2
>               System.Console.WriteLine("Hello A")
>               xx = initMoves()                  '<<<
>               System.Console.WriteLine("Hello world!")
>       End Sub
>       function initMoves() as integer
This must be:
      Shared function initMoves () as integer
>               System.Console.WriteLine("Hi2")
>               initMoves = 3
>               System.Console.WriteLine("Hi3")
>       end function
> End Class
> 
> public structure typ_Move
> (more lines ended by end structure statement)
> @@@ code ends here @@@

There's already a bug report open about this, no need to file a new one.

Rolf

_______________________________________________
Mono-vb mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-vb

Reply via email to