using System; using System.Runtime.InteropServices; namespace YGOLegacy.Engine { public static partial class EngineBinding { public static string CheckNative() { var native = Marshal.PtrToStringAnsi(EngineApi.ygol_engine_version()); if (native == Version) return native; throw new InvalidOperationException( "ygol-engine reports version '" + native + "' but the YGOLegacy.Engine binding is '" + Version + "'; fetch the engine release whose tag equals the binding version."); } } }