Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Collections;
  7.  
  8. namespace ToDo
  9. {
  10.     class Task
  11.     {
  12.         public string Title { get; private set; }
  13.         public string Descr { get; private set; }
  14.         DateTime Deadline { get; private set; }
  15.         List<string> Tags;
  16.         public Task(string title, string descr, DateTime deadline, List<string> tags)
  17.         {
  18.             this.Title = title;
  19.             this.Descr = descr;
  20.             this.Deadline = deadline;
  21.             this.Tags = new List<string>(tags);
  22.         }
  23.     }
  24.     class Program
  25.     {
  26.         static void Main(string[] args)
  27.         {
  28.             string name, ann;
  29.             DateTime date;
  30.             List<string> tag;
  31.             name = "task";
  32.             ann = "none";
  33.             date = new DateTime(10, 2, 2016);
  34.             tag = new List<string>();
  35.             tag.Add("q");
  36.             tag.Add("i");
  37.             Task Task1 = new Task(name, ann, date, tag);
  38.             Console.WriteLine(Task1.Title);
  39.  
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement