using System; namespace NvAPIWrapper.GPU { /// /// Contains information about the GPU Video BIOS /// public class VideoBIOS { internal VideoBIOS(uint revision, int oemRevision, string versionString) { Revision = revision; OEMRevision = oemRevision; VersionString = versionString.ToUpper(); } /// /// Gets the the OEM revision of the video BIOS /// public int OEMRevision { get; } /// /// Gets the revision of the video BIOS /// public uint Revision { get; } /// /// Gets the full video BIOS version string /// public string VersionString { get; } /// public override string ToString() { return AsVersion().ToString(); } /// /// Returns the video BIOS version as a .Net Version object /// /// A Version object representing the video BIOS version public Version AsVersion() { return new Version( (int) ((Revision >> 28) + ((Revision << 4) >> 28) * 16), // 8 bit little endian (int) (((Revision << 8) >> 28) + ((Revision << 12) >> 28) * 16), // 8 bit little endian (int) ((Revision << 16) >> 16), // 16 bit big endian OEMRevision // 8 bit integer ); } } }