Variant Class ============= AMPL base type, can store a number or a string Namespace :dn:ns:`ampl` Assemblies * AMPL ---- .. contents:: :local: Inheritance Hierarchy --------------------- * :dn:cls:`System.Object` * :dn:cls:`System.Collections.Generic.Comparer{ampl.Variant}` * :dn:cls:`ampl.Variant` Syntax ------ .. code-block:: csharp [ClassInterface(ClassInterfaceType.None)] public class Variant : Comparer, IComparer, IComparer, IComparable, IVariant .. dn:class:: ampl.Variant :hidden: .. dn:class:: ampl.Variant Methods ------- .. dn:class:: ampl.Variant :noindex: :hidden: .. dn:method:: ampl.Variant.Compare(ampl.Variant, ampl.Variant) :type x: ampl.Variant :type y: ampl.Variant :rtype: System.Int32 .. code-block:: csharp public override int Compare(Variant x, Variant y) .. dn:method:: ampl.Variant.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. :param obj: An object to compare with this instance. :type obj: System.Object :rtype: System.Int32 :return: 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 obj in the sort order. Zero This instance occurs in the same position in the sort order as obj. Greater than zero This instance follows obj in the sort order. .. code-block:: csharp public int CompareTo(object obj)