ShellFile so = ShellFile.FromFilePath(fromPath); double nanoseconds; double.TryParse(so.Properties.System.Media.Duration.Value.ToString(), out nanoseconds); Console.WriteLine("NanaoSeconds: {0}", nanoseconds); if (nanoseconds > 0) { // double milliseconds = nanoseconds * 0.000001; double seconds = Convert100NanosecondsToMilliseconds(nanoseconds) / 1000; string duration= Convert.ToInt64(seconds) / 60 + ":" + Convert.ToInt64(seconds) % 60; Console.WriteLine(duration.ToString()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)