static void Main() { Rectangle rectangle = new Rectangle(); rectangle.GetValue(); rectangle.Display(); }
static void Main(string[] args) { Rectangle rect = new Rectangle(15, 20); rect.Display(); Console.ReadLine(); }
static void Main(string[] args) { Rectangle r = new Rectangle(); r.Acceptdetails(); r.Display(); }
static void Main(string[] args) { Rectangle r1 = new Rectangle(); //新增房间1,r1是房间1的钥匙 Rectangle r2 = new Rectangle(); //新增房间2,r2是房间2的钥匙 //Rectangle r3 = r1;//r3是房间1的钥匙 r1.Acceptdetails(1.4, 2, "m"); r2.Acceptdetails(1400, 2000, "mm"); r1.Display(); r2.Display(); if (r1 == r2) { Console.WriteLine("==================="); } else { Console.WriteLine("!!!!!!!!!!!!!!!!!!!"); } Console.ReadLine(); }
static void Main(string[] args) { Rectangle r = new Rectangle(); r.Acceptdetails(); r.Display(); Console.ReadLine(); }
static void main(String[] args) { int?num2 = 45; Rectangle r = new Rectangle(); r.length = 5; r.width = 2; r.Display(); int max = r.FindMax(r.length, r.width); Console.ReadKey(); r.Factorial(4); // Initialization of array int [] marks = new int[5] { 1, 2, 3, 4, 5 }; for (int i = 0; i < 5; i++) { Console.WriteLine("Element {0}: {1}", i, marks[i]); } foreach (int j in n) { } }
static void Main(string[] args) { Rectangle r = new Rectangle(); r.Display(); Console.WriteLine("Area: {0}", r.GetArea()); Console.ReadLine(); }
static void Main(string[] args) { Rectangle r = new Rectangle(); r.AcceptDetails(3, 4); r.Display(); Console.ReadKey(); }
static void Main(string[] args) { Rectangle r = new Rectangle(); r.length = 4.5; r.width = 3.5; r.Display(); }
void Main(string[] args) { Rectangle r = new Rectangle(); r.Acceptdetails(); r.Display(); Console.ReadLine(); }
static void Main(string[] args) { // 实例化一个类型对象 Rectangle r = new Rectangle(); r.Acceptdetails(); r.Display(); Console.ReadLine(); }
static void Main(String[] args) { Rectangle r = new Rectangle(); r.AcceptDetails(); r.GetArea(); r.Display(); Console.ReadLine(); }
static void Main(string[] args) { Rectangle r = new Rectangle(); Console.WriteLine("Hello World"); r.Acceptdetails(); r.Display(); Console.ReadLine(); }
public static void Main(string[] args) { Rectangle r = new Rectangle(); r.length = 3.5; r.width = 4.5; r.Display(); Console.ReadLine(); }
static void Main() { Rectangle r = new Rectangle(); r.length = 4.5; r.width = 3.5; r.Display(); Console.ReadLine(); }
static void Main(string[] args) { Rectangle myRectangle = new Rectangle(); myRectangle.UserEntries(); myRectangle.Display(); Console.ReadLine(); }
static void Main_encapsulationpublic(string[] args) { Rectangle r = new Rectangle(); //can access length, width and methods because all are declared public r.length = 4.5; r.width = 3.5; r.Display(); Console.ReadLine(); }
static void Main(string[] args) { Rectangle r = new Rectangle { length = 12.5, width = 8.25 }; r.Display(); ReadLine(); }
static void Main(string[] args) { Rectangle r = new Rectangle(); //r.Acceptdetails(); //r.length = 4.5; //r.width = 3.5; //r.Acceptdetails(); r.length = 4.5; r.width = 3.5; r.Display(); Console.ReadLine(); }
static void Main(string[] args) { Rectangle r = new Rectangle(); r.Acceptdetails(); r.Display(); Console.WriteLine("Now comes the triangle. "); Triangle t = new Triangle(); t.GetDetails(10, 30); t.Display(); Console.ReadLine(); }
static void Main(string[] args) { WriteLine("Hit any key to view the next shape results\n"); Rectangle r = new Rectangle(); Triangle t = new Triangle(); Square s = new Square(); Octagon o = new Octagon(); t.Display(); s.Display(); r.Display(); o.Display(); }
static void Main(string[] args) { Console.WriteLine("\n ----Rectangle---- \n"); Rectangle r = new Rectangle(); r.length = 4.5; r.width = 3.5; r.Display(); Console.WriteLine("\n ----Triangle---- \n"); Triangle t = new Triangle(); t.GetData(); t.Display(); Console.WriteLine("\n ----Square---- \n"); Square s = new Square(); s.base_l = 10; s.height = s.base_l; s.Display(); Console.ReadLine(); }
static void Main(string[] args) { Rectangle rectangle = new Rectangle(4.5, 4.6); rectangle.Display(); }