2 /* ****************************************************************************
4 * Copyright (c) Microsoft Corporation.
6 * This source code is subject to terms and conditions of the Microsoft Public License. A
7 * copy of the license can be found in the License.html file at the root of this distribution. If
8 * you cannot locate the Microsoft Public License, please send an email to
9 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
10 * by the terms of the Microsoft Public License.
12 * You must not remove this notice, or any other, from this software.
15 * ***************************************************************************/
16 using System; using Microsoft;
20 using System.Linq.Expressions;
22 using Microsoft.Linq.Expressions;
26 namespace System.Dynamic {
28 namespace Microsoft.Scripting {
31 // Miscellaneous helpers that don't belong anywhere else
32 internal static class Helpers {
34 internal static Expression Convert(Expression expression, Type type) {
35 if (expression.Type == type) {
38 return Expression.Convert(expression, type);