logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct OsMonitorInfo

    Represents information about a connected monitor.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.SystemConfiguration.Application.Interfaces
    Assembly: Serenity.SystemConfiguration.Application.dll
    Syntax
    public readonly struct OsMonitorInfo

    Constructors

    OsMonitorInfo(string, string, int, int, int, int, int, bool, float, string, string, string, string, string, int?, int?)

    Initializes a new instance of the OsMonitorInfo struct with the specified parameters.

    Declaration
    public OsMonitorInfo(string id, string friendlyName, int x, int y, int width, int height, int hz, bool isPrimary, float scale = 1, string manufacturer = null, string model = null, string pnpVendor = null, string productCodeHex = null, string serial = null, int? manufactureWeek = null, int? manufactureYear = null)
    Parameters
    Type Name Description
    string id

    The unique identifier of the monitor.

    string friendlyName

    The friendly name of the monitor.

    int x

    The X position of the monitor in a multi-monitor setup.

    int y

    The Y position of the monitor in a multi-monitor setup.

    int width

    The width of the monitor in a multi-monitor setup.

    int height

    The height of the monitor in a multi-monitor setup.

    int hz

    The refresh rate of the monitor in Hz.

    bool isPrimary

    Indicates whether this monitor is the primary display.

    float scale

    The scaling factor of the monitor (1.0 = 100%).

    string manufacturer

    The manufacturer of the monitor. Ie "Dell", "ASUS"…

    string model

    The model of the monitor. Ie "U2720Q", "PG279Q"…

    string pnpVendor

    The PnP vendor code of the monitor.

    string productCodeHex

    The product code in hexadecimal format of the monitor.

    string serial

    The serial number of the monitor.

    int? manufactureWeek

    The manufacture week of the monitor (1-53).

    int? manufactureYear

    The manufacture year of the monitor (e.g., 2020).

    Fields

    FriendlyName

    Declaration
    public readonly string FriendlyName
    Field Value
    Type Description
    string

    Gets the friendly name of the monitor.

    Height

    Declaration
    public readonly int Height
    Field Value
    Type Description
    int

    Gets the height of the monitor in a multi-monitor setup.

    Id

    Declaration
    public readonly string Id
    Field Value
    Type Description
    string

    Gets the unique identifier of the monitor.

    IsPrimary

    Declaration
    public readonly bool IsPrimary
    Field Value
    Type Description
    bool

    Indicates whether this monitor is the primary display.

    ManufactureWeek

    Declaration
    public readonly int? ManufactureWeek
    Field Value
    Type Description
    int?

    Gets the manufacture week of the monitor (1-53).

    ManufactureYear

    Declaration
    public readonly int? ManufactureYear
    Field Value
    Type Description
    int?

    Gets the manufacture year of the monitor (e.g., 2020).

    Manufacturer

    Declaration
    public readonly string Manufacturer
    Field Value
    Type Description
    string

    Gets the manufacturer of the monitor. Ie "Dell", "ASUS"…

    Model

    Declaration
    public readonly string Model
    Field Value
    Type Description
    string

    Gets the model of the monitor. Ie "U2720Q", "PG279Q"…

    PnpVendor

    Declaration
    public readonly string PnpVendor
    Field Value
    Type Description
    string

    Gets the PnP vendor code of the monitor.

    ProductCodeHex

    Declaration
    public readonly string ProductCodeHex
    Field Value
    Type Description
    string

    Gets the product code in hexadecimal format of the monitor.

    RefreshRateHz

    Declaration
    public readonly int RefreshRateHz
    Field Value
    Type Description
    int

    Gets the refresh rate of the monitor in Hz.

    Scale

    Declaration
    public readonly float Scale
    Field Value
    Type Description
    float

    Gets the scaling factor of the monitor (1.0 = 100%).

    Serial

    Declaration
    public readonly string Serial
    Field Value
    Type Description
    string

    Gets the serial number of the monitor.

    Width

    Declaration
    public readonly int Width
    Field Value
    Type Description
    int

    Gets the width of the monitor in a multi-monitor setup.

    X

    Declaration
    public readonly int X
    Field Value
    Type Description
    int

    Gets the X position of the monitor in a multi-monitor setup.

    Y

    Declaration
    public readonly int Y
    Field Value
    Type Description
    int

    Gets the Y position of the monitor in a multi-monitor setup.

    Methods

    ToString()

    Returns a string representation of the monitor information.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representing the monitor information.

    Overrides
    ValueType.ToString()
    In this article
    © 2026 Serenity. All Rights Reserved