创建如下扩展名:
public static class PointExt
{
public static Vector2 ToVector2(this Point point)
{
return new Vector2(point.X, point.Y);
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4262 次 |
| 最近记录: |