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 ou
Indeed, simple error, when doing diversions with int, the answer will be an int. Your answer would be between 0 and 1 so rounded down it is 0 (int).
Use:
int returnvalue = (int)((FilesCompleted / (double)TotalFilesCount) * 100);
To make your calculation use a double for the fractional number and then multiply that by 100 and cast that to an int.