Add project files.
This commit is contained in:
23
PolyChat/Models/ChatMessage.cs
Normal file
23
PolyChat/Models/ChatMessage.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace PolyChat.Models
|
||||
{
|
||||
public class ChatMessage
|
||||
{
|
||||
public string Text;
|
||||
public string Date;
|
||||
public bool Foreign;
|
||||
|
||||
public ChatMessage(string text, string date, bool foreign)
|
||||
{
|
||||
Text = text;
|
||||
Date = date;
|
||||
Foreign = foreign;
|
||||
}
|
||||
|
||||
override
|
||||
public string ToString()
|
||||
{
|
||||
string prefix = Foreign ? "Other" : "Me";
|
||||
return $"{prefix}: Text";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user