Updated with C# support