Example #1
0
            public static bool TryParse(string value, out HierarchicalRelationshipType result)
            {
                result = default(HierarchicalRelationshipType);

                if( value=="parent")
                    result = HierarchicalRelationshipType.Parent;
                else if( value=="child")
                    result = HierarchicalRelationshipType.Child;
                else
                    return false;

                return true;
            }
Example #2
0
 public static string ToString(HierarchicalRelationshipType value)
 {
     if( value==HierarchicalRelationshipType.Parent )
         return "parent";
     else if( value==HierarchicalRelationshipType.Child )
         return "child";
     else
         throw new ArgumentException("Unrecognized HierarchicalRelationshipType value: " + value.ToString());
 }