PointsAndSizes.cs
Upload User: lxycoco
Upload Date: 2022-07-21
Package Size: 38457k
Code Size: 1k
Category:

CSharp

Development Platform:

Others

  1. using System;
  2. using System.Drawing;
  3. namespace ConsoleApplication1
  4. {
  5. /// <summary>
  6. /// Summary description for Class1.
  7. /// </summary>
  8. class Class1
  9. {
  10. /// <summary>
  11. /// The main entry point for the application.
  12. /// </summary>
  13. [STAThread]
  14. static void Main(string[] args)
  15. {
  16.    
  17.    Point topLeft = new Point(10,10);
  18.    Size rectangleSize = new Size(50,50);
  19.    Point bottomRight = topLeft + rectangleSize;
  20.    Console.WriteLine("topLeft = " + topLeft);
  21.    Console.WriteLine("bottomRight = " + bottomRight);
  22.    Console.WriteLine("Size = " + rectangleSize);
  23. Console.ReadLine();
  24. //
  25. // TODO: Add code to start application here
  26. //
  27. }
  28. }
  29. }