Example #1
0
 // Note: This method is not useful in C# 6 and below.
 public void Deconstract(out int id, out string name, out string remarks, out NullableInt parentId)
 {
     id       = Id;
     name     = Name;
     remarks  = Remarks;
     parentId = ParentId;
 }
Example #2
0
 public bool Equals(NullableInt other)
 {
     if (!_hasValue && !other.HasValue)
     {
         return(true);
     }
     return(_value == other.GetValueOrDefault());
 }
Example #3
0
 public ImmutableValueClass(int id, string name, string remarks, NullableInt parentId)
 {
     _id = id;
     if (ReferenceEquals(name, null))
     {
         throw new ArgumentNullException("name");
     }
     _name     = name;
     _remarks  = remarks;
     _parentId = parentId;
 }
Example #4
0
 public ImmutableValueClass(int id, string name, NullableInt parentId) : this(id, name, null, parentId)
 {
 }