private double percentage(int currentLocation) { return Math.Min(100d, 100d / (double)this.filesize * (double)currentLocation); }