https://www.youtube.com/watch?v=q-vd0saLxAU&list=PLO56HZSjrPTB4NxAsEP8HRk6YKBDLbp7m&index=61
class Car
{
public string Name {get, set;}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace testProject
{
class Car
{
private string name;
// public string Name { get; set; } = "MyCar";
// public string Name { get; private set; } = "MyCar";
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
}
}
using System;
using static System.Console;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace testProject
{
class Program
{
static void Main(string[] args)
{
Car car = new Car();
car.Name = "myCar";
WriteLine($"CarName : {car.Name}");
}
}
}