.NET Matrix Library
Add Method
See Also  Example Send comments on this topic


A
A Matrix instance on the left side of the addition operator.
B
A Matrix instance on the right side of the addition operator.
Adds two matrices.

Syntax

Visual Basic (Declaration) 
Public Shared Function Add( _
   ByVal A As Matrix, _
   ByVal B As Matrix _
) As Matrix
C# 
public static Matrix Add( 
   Matrix A,
   Matrix B
)
C++/CLI 
public:
static Matrix^ Add( 
   Matrix^ A,
   Matrix^ B
) 

Parameters

A
A Matrix instance on the left side of the addition operator.
B
A Matrix instance on the right side of the addition operator.

Return Value

A Matrix object that represents the result of the addition.

Exceptions

ExceptionDescription
SizeMismatchExceptionA, B are not of the same size.

Example

The following example uses the Add and Subtract methods to perform matrix addition and subtraction.
Visual BasicCopy Code
C#Copy Code
C++Copy Code

Remarks

The Add method is an alias for the Addition operator.

Requirements

Platforms: Windows 7, Windows Vista, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows 2000

See Also

.NET Matrix Library Documentation