public static String ToHmdTypeString(this HmdType hmdType) { Int32 index = (Int32)hmdType; if (index >= 0 && index < typeStrings.Length) { if (typeStrings[index] == null) { throw new InvalidOperationException( String.Format("Error, the typeStrings entry for hmdType \"{0}\" ({1}) was null?", hmdType.ToString(), index)); } return(typeStrings[index]); } throw new InvalidOperationException( String.Format("Error, unrecognized hmdType \"{0}\" ({1})", hmdType.ToString(), index)); }
public override string ToString() { String hmdPrintType = (hmdType == HmdType.Enumeration) ? String.Format("Enumeration({0})", EnumReference.Name) : hmdType.ToString(); return(String.Format("[HmdValueID {0} DefinitionContext={1} Type={2} Count={3} Parents={4}]", idOriginalCase, definitionContext, hmdPrintType, countProperty, AllParentsString())); }