Skip to content

Instantly share code, notes, and snippets.

@hatelove
Created February 18, 2019 16:18
Show Gist options
  • Save hatelove/da6f8d673eb2a1d0dd8068ddbaa73470 to your computer and use it in GitHub Desktop.
Save hatelove/da6f8d673eb2a1d0dd8068ddbaa73470 to your computer and use it in GitHub Desktop.
Powerful JetBrains: Visual Studio + ReSharper
using System;
namespace PowerfulJetBrains
{
public class ContactInfo
{
public ContactInfo(string email, string phone, string address)
{
Email = email;
Phone = phone;
Address = address;
}
public string Email { get; private set; }
public string Phone { get; private set; }
public string Address { get; private set; }
}
public class Candidate
{
public ContactInfo ContactInfo { get; }
public Candidate(string account, string name, DateTime birthday, ContactInfo contactInfo)
{
Account = account;
Name = name;
Birthday = birthday;
ContactInfo = contactInfo;
}
public string Account { get; private set; }
public string Name { get; private set; }
public DateTime Birthday { get; private set; }
public void AddCandidate()
{
Console.WriteLine(
$"account:{this.Account}, name:{this.Name}, birthday:{this.Birthday}," +
$" email:{ContactInfo.Email}, phone:{ContactInfo.Phone}, address:{ContactInfo.Address}");
//Console.WriteLine(
// $"account:{this.Account}, name:{this.Name}, birthday:{this.Birthday}, email:{this.Email}, phone:{this.Phone}, address:{this.Address}");
}
}
public class Resume
{
public void Scan()
{
new Candidate("91chen",
"Joey Chen",
new DateTime(1991, 9, 1),
new ContactInfo("[email protected]", "0991919191", "Taipei City-No.91")).
AddCandidate();
//new Candidate("91chen",
// "Joey Chen",
// new DateTime(1991, 9, 1),
// "[email protected]",
// "0991919191",
// "Taipei City-No.91").AddCandidate();
//AddCandidate(new Candidate("91chen",
// "Joey Chen",
// new DateTime(1991, 9, 1),
// "[email protected]",
// "0991919191",
// "Taipei City-No.91"));
//AddCandidate("91chen",
// "Joey Chen",
// new DateTime(1991, 9, 1),
// "[email protected]",
// "0991919191",
// "Taipei City-No.91");
}
}
}
using System;
namespace PowerfulJetBrains
{
public class Resume
{
public void Scan()
{
AddCandidate("91chen",
"Joey Chen",
new DateTime(1991, 9, 1),
"[email protected]",
"0991919191",
"Taipei City-No.91");
}
public void AddCandidate(string account, string name, DateTime birthday, string email, string phone, string address)
{
Console.WriteLine(
$"account:{account}, name:{name}, birthday:{birthday}, email:{email}, phone:{phone}, address:{address}");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment