This project has moved. For the latest updates, please go here.

VB Changes

Apr 4, 2010 at 1:16 PM
Edited Apr 5, 2010 at 12:31 PM

I started this thread to list the changes that need to be made to use Farseer 3 to use it with Visual Basic .Net.

You can use the engine without making the changes, but you mightn't be able to call all the methods. The main cause of this problem is that in C# you can have identical methods that differ only by using reference or value arguments, while in VB you can't.

In most cases you can fix the problem by deleting the method that you're less likely to use, usually the value one.

Here's what I've found so far:

  • AABB Constructor
  • Body.ApplyForce
  • Body.ApplyImpulse

Also, the Raycast example in the Testbed uses a multi-line Lambda expression that can't be converted to VB (VB only supports single line Lambda expressions, except for Visual Studio 10). This is easy though, you can just pass a normal function as a delegate which does what you want in a single line. Here's an article on Lambda expressions in VB.