Alright, I'm trying to calculate the percentage of two values. This should be really simple but for some weird reason it's not working. I'm too tired/dumb to figure it out. Here's my code, it keeps returning 0, i checked the values while debugging and with FilesCompleted being 295 and TotalFilesCount being 25002 the returnvalue var is just 0, it should be 1 already.
private int CalculatePercentComplete(int FilesCompleted, int TotalFilesCount)
{
int returnvalue = (FilesCompleted / TotalFilesCount) * 100;
if (returnvalue > 100 || returnvalue < 1) return 1;
else return returnvalue;
}