Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RectangleApplication {
- class Rectangle {
- double length;
- double width;
- public void Acceptdetails() {
- length = 5
- width = 4
- }
- public double GetArea() {
- return length * width;
- }
- public void Display() {
- Console.WriteLine("Length: {0}", length);
- Console.WriteLine("Width: {0}", width);
- Console.WriteLine("Area: {0}", GetArea());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement