public IEnumerable <T> PreOrden() { yield return(Key); if (Left != null) { var l = Left.PreOrden(); foreach (var item in l) { yield return(item); } } if (Rigth != null) { var r = Rigth.PreOrden(); foreach (var item in r) { yield return(item); } } }
public IEnumerable <T> PreOrden() { return(Count > 0 ? root.PreOrden() : root.EmptyEnum()); }