//Create a new Rectangle with specified dimensions Rectangle rect = new Rectangle(100f, 100f, 200f, 200f); //Get the Top position of the rectangle float topPosition = rect.GetTop(); //Output the top position Console.WriteLine("Top Position: " + topPosition);In this example, a new rectangle is created with a width and height of 200 units and a position of 100 from the left and top. Then, the GetTop method is used to get the top position of the rectangle which is 300. Finally, the top position is printed to the console. This code example is written in C# and uses the iTextSharp.text package library.
public GetTop ( float margin ) : float | ||
margin | float | a margin |
return | float |