

kovertovanie času(string) na € C#
Zdravím,
Vytváram v C# časomieru a uplynulý čas (minúty) násobím 5 centami, čiže 0,05€.
Problém je v tom , že chcem aby mi v label4 vypísalo nie 175 centov , ale 1,72 €.
kód mam následovný:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
namespace Casomiera
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Stopwatch sw = new Stopwatch();
Stopwatch sw1 = new Stopwatch();
Stopwatch sw2 = new Stopwatch();
private void button1_Click(object sender, EventArgs e)
{
timer1.Start();
sw.Start();
button2.Enabled = false;
}
private void button3_Click(object sender, EventArgs e)
{
timer1.Stop();
button2.Enabled = true;
button1.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
sw.Reset();
label1.Text = "00:00:00";
button1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
TimeSpan elapsed = sw.Elapsed;
label1.Text = String.Format("{0:00}:{1:00}:{2:00}",
Math.Floor(elapsed.TotalHours), elapsed.Minutes,
elapsed.Seconds);
label4.Text = String.Format("{1:00}",
Math.Floor(elapsed.TotalHours), elapsed.Minutes*5); // násobenie uplynutého času
}
}
skúšal som násobiť minútu 0,05 ale nefungovalo.
Ďakujem.