Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
FudgeVB - simple C# file and instructions to use VB libraries in Unity3D projects
// GOAL: To remove dependency on Microsoft.VisualBasic in VB.NET libs... (eg. to use them in Unity3D)
// Place this file in a separate C# project and reference it from the VB project
// In the .vbproj file add
// <NoVBRuntimeReference>true</NoVBRuntimeReference>
// in the first <PropertyGroup> (the one without a condition at the beginning)
// This implies a ton of fixes to apply to replace things like string compare etc.
// Non-exhaustive list of fixes :
// - auto conversions are not done (use .ToString() for example)
// - use DirectCast(obj, Integer) instead of CInt(obj)
// - Sync Lock does not seem to compile, remove it if you don't need thread safety
// ** Please fork this and complete with missing functions below :) **
namespace FudgeVB
public static class SillyThings
public static T IIf<T>(bool condition, T trueValue, T falseValue)
return condition ? trueValue : falseValue;
public static char Chr(int n)
return (char)n;
public static char ChrW(int n)
return (char)n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.