Mono.MoonError.FromIntPtr C# (CSharp) Method

FromIntPtr() public static method

public static FromIntPtr ( IntPtr moon_error ) : MoonError
moon_error System.IntPtr
return MoonError
        public static MoonError FromIntPtr(IntPtr moon_error)
        {
            MoonError err = (MoonError)Marshal.PtrToStructure (moon_error, typeof (MoonError));
            if (err.message != IntPtr.Zero) {
                string msg = Marshal.PtrToStringAuto (err.message);
                //err.message = Value.StringToIntPtr (msg);
            }

            return err;
        }