Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

Size(Int32, Int32) 构造函数

Represents a size with integer width and height dimensions 表示具有整数宽度和高度尺寸的大小

Definition

命名空间: DeploySharp.Data
程序集: DeploySharp (在 DeploySharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
C#
public Size(
	int Width,
	int Height
)

参数

Width  Int32

[缺少 "M:DeploySharp.Data.Size.#ctor(System.Int32,System.Int32)" 的 <param name="Width"/> 文档]

Height  Int32

[缺少 "M:DeploySharp.Data.Size.#ctor(System.Int32,System.Int32)" 的 <param name="Height"/> 文档]

备注

Used for representing dimensions of rectangular areas in integer units. Suitable for pixel-based operations and discrete coordinate systems.

用于表示矩形区域的整数单位尺寸。 适用于基于像素的操作和离散坐标系。

示例

Basic usage:
C#
var size = new Size(1920, 1080); // HD resolution
var fromDouble = new Size(1920.7, 1080.3); // Will truncate to (1920, 1080)

参见