Home  |  Delphi .net Home  |  System.TimeSpan  |  Negate Method
  
Negate  
Method  
Negates the current TimeSpan value
TimeSpan Structure
System NameSpace
CF1.  Function Negate : TimeSpan;
CF : Methods with this mark are Compact Framework Compatible
Description
Returns a new TimeSpan with the current TimeSpane value negated.
Microsoft MSDN Links
System
System.TimeSpan
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  span1, span2 : TimeSpan;

begin
  span1 := TimeSpan.Create(2, 3, 4, 0);    // 2 days, 3 hours,  4 minutes

  span2 := span1.Negate;

  Console.WriteLine('Span1 = {0}', span1);
  Console.WriteLine('Span2 = {0}', span2);

  Console.ReadLine;
end.
   Span1 = 2.03:04:00
   Span2 = -2.03:04:00
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author