This morning I was working on my game since for some odd reason I woke up 2 hours before I had to work. The funny thing is that I have just started using C# at the same time I started using XNA. Of course I work in C, C++ and Visual Basic for work and Michigan Tech teaches Java as its primary course language (among some others for special classes, such as LISP, Prolog, Veralog, Matlab, Fortran, etc...). It has been really easy to pick up C# as it is almost syntactically the same as C++, mixed in with a few things from Java. Granted it has its own things unique to the new .Net platform such as the "Using" keyword for things other than import libraries, the ever interesting partial classes, and a few other things I'm not all that familiar with yet, such as attribute tags and the new Getter/Setter syntax (I'm old school, I like method names with get and set in them).
The point I was getting at though, was that this morning I was trying to extend a class for the items from the HMModel class that was developed from the Hazy Mind site and I kept trying to use the super() call to the parent constructor. I did an F1 search and it even came up as a keyword to call the parent class for constructor calling and method access. Well it didn't work and I kept getting exceptions. Seems the correct use is to call base() in the initialization list like C++... Thats where knowing too many languages can cause you problems.
No comments:
Post a Comment