Rect rect1 = new Rect(0, 0, 50, 50); Rect rect2 = new Rect(60, 0, 50, 50); rect1.AlignRight(rect2); Console.WriteLine(rect1); // output: {X=110, Y=0, Width=50, Height=50}In this example, we create two rectangles - `rect1` and `rect2`. The `AlignRight` method is called on `rect1` with `rect2` as the input parameter. This moves `rect1` to the right of `rect2`. The output is the new `rect1` object after being aligned to the right of `rect2`. This method belongs to the `System.Windows.Rect` namespace, which is part of the PresentationCore.dll library.