5
Voglio un metodo che somma i dati che è la stringa nel formato hh: mm (ore di tempo e minuti)C# Metodo per sommare i dati hh: mm ???
0:15 + 0:15 = 0:30
Voglio un metodo che somma i dati che è la stringa nel formato hh: mm (ore di tempo e minuti)C# Metodo per sommare i dati hh: mm ???
0:15 + 0:15 = 0:30
Convertire le stringhe da TimeSpan
s e quindi chiamare il metodo .Add
.
TimeSpan s1 = TimeSpan.Parse("0:15");
TimeSpan s2 = TimeSpan.Parse("0:45");
TimeSpan s3 = s1 + s2;
// not tested; should work.
Rif: http://msdn.microsoft.com/en-us/library/system.timespan.aspx
Cos'hai finora? – PostMan
Nowhere haaa ..... – abmv