System.Drawing.Size.Add C# (CSharp) Method

Add() public static method

Performs vector addition of two objects.

public static Add ( Size sz1, Size sz2 ) : Size
sz1 Size
sz2 Size
return Size
        public static Size Add(Size sz1, Size sz2) => new Size(sz1.Width + sz2.Width, sz1.Height + sz2.Height);

Same methods

Size::Add ( System sz1, System sz2 ) : System.Drawing.Size

Usage Example

		/// <summary>
		/// Center between two Sizes
		/// </summary>
		/// <param name="p1"></param>
		/// <param name="p2"></param>
		/// <returns>Center point</returns>
		public static Size Center(Size p1, Size p2) => (p2.Add(p1)).Scale(0.5f);
All Usage Examples Of System.Drawing.Size::Add