Point4D.Add Method

Adds a Point4D structure to a Point4D.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static Point4D Add(
	Point4D point1,
	Point4D point2


Type: System.Windows.Media.Media3D.Point4D

The first Point4D structure to add.

Type: System.Windows.Media.Media3D.Point4D

The second Point4D structure to add.

Return Value

Type: System.Windows.Media.Media3D.Point4D
Returns the sum of point1 and point2.

The following example shows how to add two Point4D structures.

// Add a Point4D to a Point4D using the overloaded + operator.  
// Returns a Point4D.

Point4D point1 = new Point4D(10, 5, 1, 4);
Point4D point2 = new Point4D(15, 40, 60, 75);
Point4D pointResult = new Point4D();

pointResult = point1 + point2;
// pointResult is equal to (25, 45, 61, 79)) 

// Displaying Results
syntaxString = "pointResult = point1 + point2;";
resultType = "Point4D";
operationString = "Adding a 3D Point and a 3D Vector";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft