Dimension - Java到C# [英] Dimension - Java to C#

查看:152
本文介绍了Dimension - Java到C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的代码(在Java中)是否有C#中的等效代码?



public Dimension getDimensions()

{

返回新维度(1000,1000);

}

解决方案

您可以在C#中使用

System.Drawing.Point表示一对有序的整数x和y坐标,用于定义二维平面中的点。



 public System.Drawing.Point getDimensions()
{
return new System.Drawing.Point(1000,1000);
}



点结构 [ ^ ]


Is there an equivalent code in C# for the below code(in Java) ?

public Dimension getDimensions()
{
return new Dimension(1000,1000);
}

解决方案

You can use in C#
"System.Drawing.Point" that Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.

public System.Drawing.Point getDimensions()
       {
           return new System.Drawing.Point(1000, 1000);
       }


Point Structure[^]


这篇关于Dimension - Java到C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆