On 15.12.2010 09:51, marcus julius wrote: > Hi, > > I call a c++ function from C# using mono. > For instance, > > [MethodImplAttribute(MethodImplOptions.InternalCall)] > extern internal static Object get_ai_behavior_object(int id); > > When the function returns a NULL object, there is a NullReferenceException. I > think it occurs because C# tries to cast null to System.Object. > > Is there a way to avoid this without using try-catch which slows the program > or a dummy Null object I need to create?
This is expected to work. Please show more code or better file a bug with a self-contained test case. Robert _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list