/// <summary> /// Clone this object /// </summary> /// <returns>Copy of this</returns> public object Clone() { if(m_isNull) throw new InvalidOperationException("Object is nullable"); Person p = new Person(); AssignTo(p); return p; }
/// <summary> /// Validation function for Person /// </summary> /// <param name="p">Person object</param> public static bool Validate(Person o) { Person p = o as Person; if(p==null || p.isNull) return false; return p.ID > 0; }