The Methods and Fields Supported by Single : Float Point Number : Data Type C# Examples


C# Examples » Data Type » Float Point Number »

 

The Methods and Fields Supported by Single








Method
Meaning


public int CompareTo(object v)
Returns zero if the values are equal. Returns a negative value if the invoking object has a lower value. Returns a positive value if the invoking object has a greater value.


public override bool Equals(object v)
Returns true if the value of the invoking object equals the value of v.


public override int GetHashCode()
Returns the hash code.


public TypeCode GetTypeCode()
Returns the TypeCode enumeration value for Single, which is TypeCode.Single.


public static bool IsInfinity(float v)
Is it infinity (either positive or negative).


public static bool IsNaN(float v)
Is v not a number.


public static bool IsPositiveInfinity(float v)
Is v positive infinity.


public static bool IsNegativeInfinity(float v)
Is v negative infinity.


public static float Parse(string str)
Parse the string. If the string does not represent a float value, an exception is thrown.


public static floatParse(string str,IFormatProvider fmtpvdr)
Parse the string using the culture-specific information provided by fmtpvdr.


public static floatParse(string str, NumberStyles styles)
Parse string using the style information provided by styles.


public static floatParse(string str,NumberStyles styles,IFormatProvider fmtpvdr)
Parse the string using the style information provided by styles and the culture-specific format information provided by fmtpvdr.


public override string ToString()
Convert it to string.


public string ToString(string format)
Convert it to string using the specified format.


public stringToString(IFormatProvider fmtpvdr)
Returns the string representation of the value of the invoking object using the culture-specific information specified in fmtpvdr.


public stringToString(string format,IFormatProvider fmtpvdr)
Returns the string representation of the value of the invoking object using the culture-specific information specified in fmtpvdr and the format specified by format.






Field
Meaning


public const float Epsilon
The smallest non-zero positive value.


public const float MaxValue
The largest value that a float can hold.


public const float MinValue
The smallest value that a float can hold.


public const float NaN
A value that is not a number.


public const float NegativeInfinity
A value representing negative infinity.


public const float PositiveInfinity
A value representing positive infinity.






HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Float Point Number