Hi all I am currently working on a project where when a certain event happens details about the event including the time that the event occurred is added into a list array.
This version always returns the number of seconds difference as a positive number (same result as @freedeveloper's solution):
var seconds = System.Math.Abs((date1 - date2).TotalSeconds);