Size(Double, Double) 构造函数

定义

初始化 Size 结构的新实例,并为其分配初始宽度和高度。Initializes a new instance of the Size struct and assigns it an initial width and height.

public:
 Size(double width, double height);
public Size (double width, double height);
new Windows.Foundation.Size : double * double -> Windows.Foundation.Size
Public Sub New (width As Double, height As Double)

参数

width
Double

Size 的实例的初始宽度。The initial width of the instance of Size.

height
Double

Size 的实例的初始高度。The initial height of the instance of Size.

例外

widthheight 小于 0。width or height are less than 0.

注解

此结构表示 Windows 运行时 (WinRT) 结构的 .NET 投影 SizeThis struct represents the .NET projection of the Windows Runtime (WinRT) Size struct. 有关详细信息,请参阅 UWP API 参考中的 大小For more information, see Size in the UWP API reference.

适用于