Variant Class

AMPL base type, can store a number or a string

Namespace
ampl
Assemblies
  • AMPL

Inheritance Hierarchy

  • System.Object
  • System.Collections.Generic.Comparer{ampl.Variant}
  • ampl.Variant

Syntax

[ClassInterface(ClassInterfaceType.None)]
public class Variant : Comparer<Variant>, IComparer<Variant>, IComparer, IComparable, IVariant
class ampl.Variant

Methods

Compare(ampl.Variant, ampl.Variant)
Return type:System.Int32
public override int Compare(Variant x, Variant y)
CompareTo(System.Object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Arguments:
  • obj (System.Object) – An object to compare with this instance.
Return type:

System.Int32

Returns:

A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes <code data-dev-comment-type=”paramref” class=”paramref”>obj</code> in the sort order. Zero This instance occurs in the same position in the sort order as <code data-dev-comment-type=”paramref” class=”paramref”>obj</code>. Greater than zero This instance follows <code data-dev-comment-type=”paramref” class=”paramref”>obj</code> in the sort order.

public int CompareTo(object obj)