Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp18
- {
- class Program
- {
- static void Main(string[] args)
- {
- Car A1 = new Car("Audi","Black","EN6969KN");
- A1.Danni();
- }
- }
- class Car
- {
- private string Brand;
- public string brand
- {
- get { return Brand; }
- set { Brand = value; }
- }
- private string Color;
- public string color
- {
- get { return Color; }
- set { Color = value; }
- }
- private string Id;
- public string id
- {
- get { return Id; }
- set { Id = value; }
- }
- public Car(string brand, string color, string id)
- {
- this.brand = brand; this.color = color; this.id = id;
- }
- public void Danni()
- {
- Console.WriteLine(brand + " " + color + " " + id);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement