public void FieldStatic() { MemberAssignment expr = Expression.Bind(MemberClass.GetStaticFieldInfo(), Expression.Constant(1)); Assert.AreEqual(MemberBindingType.Assignment, expr.BindingType, "Bind#05"); Assert.AreEqual("StaticField = 1", expr.ToString(), "Bind#06"); }
public void StaticField2() { var expr = Expression.Field(null, MemberClass.GetStaticFieldInfo()); Assert.AreEqual(ExpressionType.MemberAccess, expr.NodeType, "Field#07"); Assert.AreEqual(typeof(int), expr.Type, "Field#08"); Assert.AreEqual("MemberClass.StaticField", expr.ToString(), "Field#09"); }