Fix a few for Example3

This commit is contained in:
sta
2014-04-01 15:20:50 +09:00
parent b4eb9ead87
commit 0cb2335b48
3 changed files with 7 additions and 6 deletions

View File

@@ -19,12 +19,13 @@ namespace Example3
public Chat (string prefix)
{
_prefix = prefix ?? "anon#";
_prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#";
}
private string getName ()
{
return Context.QueryString ["name"] ?? (_prefix + getNum ());
var name = Context.QueryString ["name"];
return !name.IsNullOrEmpty () ? name : (_prefix + getNum ());
}
private static int getNum ()