A couple of fixes for TimeZoneInfo.ConvertTime.
[mono.git] / mcs / class / System.Core / System.Linq / QueryableEnumerable.cs
index 34046f0a5248fb53c853bd04a74d007be95bf6de..8dfe62a3eac023c366ef090089d9cb802e51e70c 100644 (file)
@@ -113,5 +113,20 @@ namespace System.Linq {
                        var lambda = Expression.Lambda<Func<TResult>> (TransformQueryable (expression));
                        return lambda.Compile ().Invoke ();
                }
+
+               public override string ToString ()
+               {
+                       if (enumerable != null)
+                               return enumerable.ToString ();
+
+                       if (expression == null)
+                               return base.ToString ();
+
+                       var constant = expression as ConstantExpression;
+                       if (constant != null && constant.Value == this)
+                               return base.ToString ();
+
+                       return expression.ToString ();
+               }
        }
 }