本文整理汇总了C#中Altaxo.Data.AltaxoVariant.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# AltaxoVariant.Equals方法的具体用法?C# AltaxoVariant.Equals怎么用?C# AltaxoVariant.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Altaxo.Data.AltaxoVariant
的用法示例。
在下文中一共展示了AltaxoVariant.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FromPhysicalVariant
/// <summary>
/// Initialized a 2D identifier from the parallel axis and the physical value of the perpendicular axis.
/// </summary>
/// <param name="parallelAxisNumber">Number of parallel axis (0->X, 1->Y, 2->Z).</param>
/// <param name="physicalValueOther">Physical value of the axis perendicular to the parallel axis.</param>
/// <returns>A freshly created 2D line identifier.</returns>
public static CSLineID FromPhysicalVariant(int parallelAxisNumber, AltaxoVariant physicalValueOther)
{
if (parallelAxisNumber < 0 || parallelAxisNumber > 2)
throw new ArgumentOutOfRangeException("AxisNumber must be either 0, 1, or 2, but you provide: " + parallelAxisNumber.ToString());
if (!physicalValueOther.Equals(physicalValueOther))
throw new ArgumentException("You can not set physical values that return false when compared to itself, value is: " + physicalValueOther.ToString());
CSLineID id = new CSLineID();
id._parallelAxisNumber = parallelAxisNumber;
id._physicalValueFirstOther = physicalValueOther;
id._logicalValueFirstOther = double.NaN;
id._usePhysicalValueFirstOther = true;
id._logicalValueSecondOther = double.NaN;
return id;
}