From 0a263622f0132100abfa1179e60b014ecf171cda Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 3 Dec 2013 15:45:14 +0900 Subject: [PATCH] Modified Chat.cs --- Example2/Chat.cs | 4 ++-- Example3/Chat.cs | 4 ++-- README.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Example2/Chat.cs b/Example2/Chat.cs index 99a39602..cff3f4ea 100644 --- a/Example2/Chat.cs +++ b/Example2/Chat.cs @@ -13,13 +13,13 @@ namespace Example2 private string _prefix; public Chat () - : this ("anon#") + : this (null) { } public Chat (string prefix) { - _prefix = prefix; + _prefix = prefix ?? "anon#"; } private string getName () diff --git a/Example3/Chat.cs b/Example3/Chat.cs index 0d49caca..ae8d7907 100644 --- a/Example3/Chat.cs +++ b/Example3/Chat.cs @@ -13,13 +13,13 @@ namespace Example3 private string _prefix; public Chat () - : this ("anon#") + : this (null) { } public Chat (string prefix) { - _prefix = prefix; + _prefix = prefix ?? "anon#"; } private string getName () diff --git a/README.md b/README.md index 93eff026..0432f3db 100644 --- a/README.md +++ b/README.md @@ -294,13 +294,13 @@ public class Chat : WebSocketService private string _suffix; public Chat () - : this (String.Empty) + : this (null) { } public Chat (string suffix) { - _suffix = suffix; + _suffix = suffix ?? String.Empty; } protected override void OnMessage (MessageEventArgs e)