Class DisplayResolution
Contains information regarding a monitor's display resolution.
Inherited Members
Namespace: OpenTK
Assembly: OpenTK.dll
Syntax
public class DisplayResolution
Properties
BitsPerPixel
Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.
Declaration
public int BitsPerPixel { get; }
Property Value
Type | Description |
---|---|
Int32 |
Height
Gets a System.Int32 that contains the height of this display in pixels.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
Int32 |
RefreshRate
Gets a System.Single representing the vertical refresh rate of this display.
Declaration
public float RefreshRate { get; }
Property Value
Type | Description |
---|---|
Single |
Width
Gets a System.Int32 that contains the width of this display in pixels.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Equals(Object)
Determines whether the specified resolutions are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The System.Object to check against. |
Returns
Type | Description |
---|---|
Boolean | True if the System.Object is an equal DisplayResolution; false otherwise. |
Overrides
GetHashCode()
Returns a unique hash representing this resolution.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A System.Int32 that may serve as a hash code for this resolution. |
Overrides
ToString()
Returns a System.String representing this DisplayResolution.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A System.String representing this DisplayResolution. |
Overrides
Operators
Equality(DisplayResolution, DisplayResolution)
Compares two instances for equality.
Declaration
public static bool operator ==(DisplayResolution left, DisplayResolution right)
Parameters
Type | Name | Description |
---|---|---|
DisplayResolution | left | The first instance. |
DisplayResolution | right | The second instance. |
Returns
Type | Description |
---|---|
Boolean | True, if left equals right; false otherwise. |
Inequality(DisplayResolution, DisplayResolution)
Compares two instances for inequality.
Declaration
public static bool operator !=(DisplayResolution left, DisplayResolution right)
Parameters
Type | Name | Description |
---|---|---|
DisplayResolution | left | The first instance. |
DisplayResolution | right | The second instance. |
Returns
Type | Description |
---|---|
Boolean | True, if left does not equal right; false otherwise. |