[Modify] Replace it

This commit is contained in:
sta 2022-01-19 20:08:36 +09:00
parent 53ade2eb47
commit b4b54b3277

View File

@ -12,13 +12,18 @@ namespace Example2
private string _prefix; private string _prefix;
public Chat () public Chat ()
: this (null)
{ {
_prefix = "anon#";
} }
public Chat (string prefix) public string Prefix {
{ get {
_prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#"; return _prefix;
}
set {
_prefix = !value.IsNullOrEmpty () ? value : "anon#";
}
} }
private string getName () private string getName ()