Written for console. Change static to private or public for gui.
example;PHP Code:
static bool CheckNegative(double Value)
{
return Value < 0 ? true : false;
}
PHP Code:
Console.WriteLine(CheckNegative(-50)); //Returns true
Console.WriteLine(CheckNegative(50)); //Returns false
Results 1 to 3 of 3
Thread: [C#] Check negative
- 08 Jul. 2011 08:30pm #1
[C#] Check negative
- 08 Jul. 2011 08:43pm #2
Nice. +Rep bro,.
- 27 Jul. 2011 12:38pm #3
Could be shortened to:
PHP Code:static bool CheckNegative(double Value)
{
return Value < 0;
}