This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 21st, 2011  |  syntax: C#  |  size: 0.98 KB  |  views: 104  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. [KnownType(typeof(TransmissionSubclass))]
  2.     [KnownType(typeof(TransmissionClass))]
  3.     [DataContract]
  4.     public class TransmissionClass
  5.     {
  6.         [DataMember]
  7.         public string Name {get; private set;}
  8.  
  9.        
  10.         [DataMember]
  11.         public List<MySubInterface> SubClasses{get;private set;}
  12.  
  13.         public TransmissionClass(string name, List<MySubInterface> aList) : this(name)
  14.         {
  15.             SubClasses = aList;
  16.         }
  17.  
  18.         /* */
  19.         public TransmissionClass(string name)
  20.         {
  21.             Name = name;
  22.         }
  23.  
  24.         public override string ToString()
  25.         {
  26.             return "TransmissionClass,:" + Name + "|count:" + SubClasses.Count;
  27.         }
  28.     }
  29.  
  30. [DataContract]
  31.     [Serializable]
  32.     public class TransmissionSubclass : MySubInterface
  33.     {
  34.         [DataMember]
  35.         public int Value{get;private set;}
  36.  
  37.         public TransmissionSubclass(int aValue)
  38.         {
  39.             Value = aValue;
  40.         }
  41.     }
clone this paste RAW Paste Data