Can anybody help me to make this piece work?
The problem is that Math.Floor is type of Double and none of casting that I apply to the variables does not work so far. Getting
"Cannot implicitly convert type 'double' to 'int' " error all the time.
"
C#, VS 2003
{
int _CurrentPageIndex = 5;
int _PageButtonCount = 2;
int StartLoop = 0;
StartLoop = (Math.Floor(_CurrentPageIndex / _PageButtonCount) * _PageButtonCount) + 1;
}
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison