本文整理汇总了C#中Point3D.Size方法的典型用法代码示例。如果您正苦于以下问题:C# Point3D.Size方法的具体用法?C# Point3D.Size怎么用?C# Point3D.Size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point3D
的用法示例。
在下文中一共展示了Point3D.Size方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SizeTest
public void SizeTest()
{
Point1D<int> point1 = new Point1D<int>(1);
Point1D<double> point2 = new Point1D<double>(1);
Point1D<decimal> point3 = new Point1D<decimal>(1);
Assert.AreEqual(point1.Size(), 4);
Assert.AreEqual(point2.Size(), 8);
Assert.AreEqual(point3.Size(), 16);
Point2D<int> point4 = new Point2D<int>(1,1);
Point2D<double> point5 = new Point2D<double>(1,1);
Point2D<decimal> point6 = new Point2D<decimal>(1,1);
Assert.AreEqual(point4.Size(), 8);
Assert.AreEqual(point5.Size(), 16);
Assert.AreEqual(point6.Size(), 32);
Point3D<int> point7 = new Point3D<int>(1, 1, 1);
Point3D<double> point8 = new Point3D<double>(1, 1, 1);
Point3D<decimal> point9 = new Point3D<decimal>(1, 1, 1);
Assert.AreEqual(point7.Size(), 12);
Assert.AreEqual(point8.Size(), 24);
Assert.AreEqual(point9.Size(), 48);
}