LEADTOOLS Forms (Leadtools.Forms assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
Add Method
See Also 
Leadtools.Forms Namespace > LogicalSize Structure : Add Method



size1
The first LogicalSize being added.
size2
The second LogicalSize being added.

The Add Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

size1
The first LogicalSize being added.
size2
The second LogicalSize being added.
Adds the width and height of one LogicalSize structure to another LogicalSize structure.

Syntax

Visual Basic (Declaration) 
Public Shared Function Add( _
   ByVal size1 As LogicalSize, _
   ByVal size2 As LogicalSize _
) As LogicalSize
Visual Basic (Usage)Copy Code
Dim size1 As LogicalSize
Dim size2 As LogicalSize
Dim value As LogicalSize
 
value = LogicalSize.Add(size1, size2)
C# 
public static LogicalSize Add( 
   LogicalSize size1,
   LogicalSize size2
)
C++/CLI 
public:
static LogicalSize Add( 
   LogicalSize size1,
   LogicalSize size2
) 

Parameters

size1
The first LogicalSize being added.
size2
The second LogicalSize being added.

Example

This example adds two size structures.

Visual BasicCopy Code
'''This example adds two size structures.
Public Sub LogicalSize_Add()
   Dim sz1 As LogicalSize = New LogicalSize(200, 300, LogicalUnit.Pixel)
   Dim sz2 As LogicalSize = New LogicalSize(1.5F, 2f, LogicalUnit.Inch)
   Dim s As String = String.Format("sz1 + sz2 = {0}", LogicalSize.Add(sz1, sz2))
   MessageBox.Show(s)
End Sub
C#Copy Code
///This example adds two size structures.
public void LogicalSize_Add()
{
   LogicalSize sz1 = new LogicalSize(200, 300, LogicalUnit.Pixel);
   LogicalSize sz2 = new LogicalSize(1.5F, 2f, LogicalUnit.Inch);
   string s = string.Format("sz1 + sz2 = {0}", LogicalSize.Add(sz1, sz2));
   MessageBox.Show(s);
}

Remarks

The addition will be done based on size1 unit.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Forms requires a Forms Module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features