ToString() public method

Fetch a preformatted output version of this ChatMessage
public ToString ( ) : String
return String
コード例 #1
0
 public void ChatMessageTest_ToString()
 {
     var msg = new ChatMessage(new DateTime(2012, 12, 11, 10, 9, 8), "TestSpeaker", "This is a test string", "all");
     Assert.AreEqual(msg.ToString(), "[12/11/2012 10:09:08 AM] [all] TestSpeaker: This is a test string");
 }