26
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
Car c = new Car("Ford","Focus");
8
Console.WriteLine(c.ToString());
9
}
10
}
11
12
public class Car
13
{
14
string Make {get;set;}
15
string Model {get;set;}
16
public Car(string make, string model)
17
{
18
this.Make = make;
19
this.Model = model;
20
}
21
22
public override string ToString()
23
{
24
return string.Format("This is a Car made by: {0} and the Model of the Car is: {1}", this.Make, this.Model);
25
}
26
}
Cached Result
Compilation error (line 1, col 7): The type or namespace name 'Systems' could not be found (are you missing a using directive or an assembly reference?)