From ea4ce03e922d100f36a9097ae77f3386c2f52a4e Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 18 Jun 2015 12:26:49 +0100 Subject: [PATCH] Use the qualified class name when casting the object from the native/managed map. --- src/Generator/Generators/CSharp/CSharpMarshal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator/Generators/CSharp/CSharpMarshal.cs b/src/Generator/Generators/CSharp/CSharpMarshal.cs index 707f2477..d3ebc888 100644 --- a/src/Generator/Generators/CSharp/CSharpMarshal.cs +++ b/src/Generator/Generators/CSharp/CSharpMarshal.cs @@ -321,7 +321,7 @@ namespace CppSharp.Generators.CSharp Context.SupportBefore.WriteLine( "else if ({0}.NativeToManagedMap.ContainsKey({1}))", qualifiedClass, Context.ReturnVarName); Context.SupportBefore.WriteLineIndent("{0} = ({1}) {2}.NativeToManagedMap[{3}];", - ret, @class.Name, qualifiedClass, Context.ReturnVarName); + ret, QualifiedIdentifier(@class), qualifiedClass, Context.ReturnVarName); var dtor = originalClass.Destructors.FirstOrDefault(); if (dtor != null && dtor.IsVirtual) {