Importing the static Agk class

Unfortunately, because the AGK static library exposes a namespace called 'AGK' and VB is not case sensitive, this will not work:

Imports TheGameCreators.AppGameKit.Agk
...
Agk.Print("Hello world!") REM this fails because 'Agk' is resolved to the namespace

To fix this, you can add this to the top of your source files:

Imports AgkNet = TheGameCreators.AppGameKit.Agk

And then use 'AgkNet' instead of 'Agk'. Autocomplete in VS2010 makes this relatively painless, especially if you do not import the whole namespace.

Last edited Feb 4, 2012 at 9:20 PM by Airslide, version 1

Comments

No comments yet.