c# check if float value is positif code example
Example 1: c# check if float value is positif
bool positive = number > 0;
bool negative = number < 0;
Example 2: c# check if is float
public bool IsFloatOrInt(string value) {
int intValue;
float floatValue;
return Int32.TryParse(value, out intValue) || float.TryParse(value, out floatValue);
}