Advertisement
kot025

lab 11 - Item.cs

Jun 12th, 2015
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 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 ConsoleApplication1;
  7.  
  8. namespace ConsoleApplication11
  9. {
  10.     class Item: ICloneable
  11.     {
  12.         #region Fields
  13.  
  14.         object _data;
  15.         Item _next;
  16.  
  17.         #endregion Fields
  18.  
  19.         #region Properties
  20.  
  21.         public object Data
  22.         {
  23.             get { return _data; }
  24.             set { _data = value; }
  25.         }
  26.         public Item Next  
  27.         {
  28.             get { return _next; }
  29.             set { _next = value; }
  30.         }
  31.  
  32.         #endregion Properties
  33.  
  34.         #region Constructors
  35.  
  36.         public Item(object data)
  37.         {
  38.             Data = data;
  39.             Next = null;
  40.         }
  41.        
  42.         #endregion Constructors
  43.         #region Methods
  44.  
  45.         public object Clone()
  46.         {
  47.             return new Item(Data);
  48.         }
  49.  
  50.         #endregion Methods
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement