Skip to content

Instantly share code, notes, and snippets.

@PhiHuyHoang
Created October 3, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PhiHuyHoang/fadf3ad5c568ad63f112ccc4f332facc to your computer and use it in GitHub Desktop.
Save PhiHuyHoang/fadf3ad5c568ad63f112ccc4f332facc to your computer and use it in GitHub Desktop.
abstract class GirlFriend
{
public string name { get; set; }
public string say { get; set; }
public string response { get; set; }
public GirlFriend(string name, string say, string response)
{
this.name = name;
this.say = say;
this.response = response;
}
}
class Uyen : GirlFriend
{
public Uyen(string name, string say, string response) : base(name, say, response)
{
}
}
class Program
{
static void Main(string[] args)
{
Console.InputEncoding = Encoding.UTF8;
Console.OutputEncoding = Encoding.UTF8;
Uyen uyen = new Uyen("Uyên", "Em ăn cơm chưa", "Anh ăn cơm rồi");
Console.WriteLine($"{uyen.name}, {uyen.say}, {uyen.response}");
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment