class Car { public Car(string Name, string Model, int Seat_Number, int Door_Number, double Price) { name = Name; model = Model; seat_Number = Seat_Number; door_Number = Door_Number; price = Price; } } --------------------------- internal class User { private string name; private int age; //constructor public User(string name, int age) { this.name = name; this.age = age; } //getters public String GetName() { return name; } public int GetAge() { return age; } } //////main class////// internal class Program { static void Main(string[] args) { Program program = new Program(); program.PrintAge(); } void PrintAge() { User me = new User("The Bad Programmer", 17); Console.WriteLine("\nmy name is " + me.GetName() + " and i am " + me.GetAge() +" yo"); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter