Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
Subtraction Operator
See Also  Example
Leadtools.Annotations Namespace > AnnLength Structure : Subtraction Operator



l1
The AnnLength structure on the left side of the subtraction operator.
l2
The AnnLength structure on the right side of the subtraction operator.
Subtracts the length of one AnnLength structure from the length of another AnnLength structure.

Syntax

Visual Basic (Declaration) 
Public Operator -( _
   ByVal l1 As AnnLength, _
   ByVal l2 As AnnLength _
) As AnnLength
C# 
public AnnLength operator -( 
   AnnLength l1,
   AnnLength l2
)
Managed Extensions for C++ 
public: AnnLength op_Subtraction( 
   AnnLength l1,
   AnnLength l2
)
C++/CLI 
public:
AnnLength operator -( 
   AnnLength l1,
   AnnLength l2
)

Parameters

l1
The AnnLength structure on the left side of the subtraction operator.
l2
The AnnLength structure on the right side of the subtraction operator.

Return Value

An AnnLength structure that is the result of the subtraction operation.

Example

This method subtracts one length from another.

Visual BasicCopy Code
Public Sub AnnLength_OperatorMinus()
   Dim ln1 As AnnLength = New AnnLength(2.0F, AnnUnit.Inch)
   Dim ln2 As AnnLength = New AnnLength(1.5F, AnnUnit.Inch)
   Dim s As String = String.Format("ln1 - ln2 = {0}", ln1 - ln2)
   MessageBox.Show(s)
End Sub
C#Copy Code
public void AnnLength_OperatorMinus() 

  AnnLength ln1 = new AnnLength(2.0F, AnnUnit.Inch); 
  AnnLength ln2 = new AnnLength(1.5F, AnnUnit.Inch); 
  string s = string.Format("ln1 - ln2 = {0}", ln1 - ln2); 
  MessageBox.Show(s); 
}

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features