c# check if float value is positif
public bool IsFloatOrInt(string value) {
int intValue;
float floatValue;
return Int32.TryParse(value, out intValue) || float.TryParse(value, out floatValue);
}
3.5
4
bool positive = number > 0;
bool negative = number < 0;
Thank you!
4
0
Are there any code examples left?
New code examples in category C#