Thursday, October 30, 2014

Get the absolute value of an integer in C#.

This suggests doing something like this:

int foo = -13;
int bar = Math.Abs(foo);

No comments:

Post a Comment