Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. class Log // Log Entry object
  2.     {
  3.         string title, content;
  4.         DateTime time;
  5.         public Log(string title, string content) // Log Entry constructor
  6.         {
  7.             this.title = title;
  8.             this.content = content;
  9.             time = DateTime.Now;
  10.         }
  11.  
  12.         public string Title() // get the entry title.
  13.         {
  14.             return title;
  15.         }
  16.  
  17.         public string Content() // Get the entry content.
  18.         {
  19.             return content;
  20.         }
  21.  
  22.         public DateTime Time() // Get the entry time.
  23.         {
  24.             return time;
  25.         }
  26.  
  27.         public void SetTime(DateTime time) // set the entry time.
  28.         {
  29.             this.time = time;
  30.         }
  31.  
  32.         public void SetTitle(string title) // Set the entry title.
  33.         {
  34.             this.title = title;
  35.         }
  36.  
  37.         public void SetContent(string content) // Set the entry content.
  38.         {
  39.             this.content = content;
  40.         }
  41.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement