C常用算法程序集,一部比较经典的程序算法合集

源代码在线查看: message.cs

软件大小: 435 K
上传用户: yzhowl
关键词: 算法 程序 比较
下载地址: 免注册下载 普通下载 VIP

相关代码

				using System;
				using System.Collections.Generic;
				using System.Text;
				
				namespace mychat1
				{
				    public struct Message
				    {
				        private readonly string userName;
				        private readonly string content;
				        private readonly DateTime postDate;
				
				        public Message(string userName, string content)
				        {
				            this.userName = userName;
				            this.content = content;
				            this.postDate = DateTime.Now;
				        }
				
				        public Message(string content) : this("System", content) { }
				
				        public string UserName
				        {
				            get { return userName; }
				        }
				
				        public string Content
				        {
				            get { return content; }
				        }
				
				        public DateTime PostDate
				        {
				            get { return postDate; }
				        }
				
				        public override string ToString()
				        {
				            return String.Format("{0}[{1}]:\r\n{2}\r\n", userName, postDate, content);
				        }
				    }
				
				}
							

相关资源