PDA

Click to See Complete Forum and Search --> : double to int


algi
Feb 10th, 2006, 05:51 PM
I've got this programme that plays sounds. I have an integer that i have to assign the value of this.adio.Duration;

Audio adio;
Video vdeo;



int second;
int total;
total = this.adio.Duration;
trackBar1.Maximum = this.adio.Duration;
trackBar1.Value = total;
lblCurrentduration.Text = total.ToString();
trackBar1.Enabled = true;

if (trackBar1.Value == trackBar1.Maximum) {
adio.Stop();
play();
}
fix: ;


how can i change the adio.Duration to an integer.

RFKevdog
Feb 10th, 2006, 07:01 PM
integer = Convert.ToInt32(adio.Duration);

tr333
Feb 10th, 2006, 07:40 PM
integer = Convert.ToInt32(adio.Duration);
the Convert.Int32(adio.Duration) method uses int.Parse(adio.Duration).