gpt4 book ai didi

c# - 从 Java 到 C# : storing couple of int using Dimension

转载 作者:行者123 更新时间:2023-11-29 06:08:12 25 4
gpt4 key购买 nike

通常在 Java 中,当我需要存储与某些图形属性相关的 2 个 int 值时,我使用维度对象:

Dimension d = new Dimension(x,y);

C#(和 XNA)中是否有类似的对象?我目前正在使用 Vector2,但它是为浮点值设计的。实际上我需要这样的结构来创建屏幕坐标列表。我正在寻找以这种方式使用的东西:

IList<Dimension> list = new List<Dimension>();
list.add(new Dimension(800,600));
...

最佳答案

Point :

Defines a point in 2D space.

IList<Point> list = new List<Point>();

关于c# - 从 Java 到 C# : storing couple of int using Dimension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7913694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com