本文整理汇总了C#中Expr.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Expr.ToString方法的具体用法?C# Expr.ToString怎么用?C# Expr.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Expr
的用法示例。
在下文中一共展示了Expr.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EqualityComparer
public static bool EqualityComparer(Expr model, Expr newmodel)
{
/*
if (model is LiteralExpr && newmodel is LiteralExpr)
{
LiteralExpr litmodel = model as LiteralExpr;
LiteralExpr litnewmodel = newmodel as LiteralExpr;
if (litnewmodel.Val.GetType() == typeof(bool) && litmodel.Val.GetType() == typeof(bool))
{
return litnewmodel.Val == litmodel.Val;
}
else if (litnewmodel.Val.GetType() == typeof(BigNum) && litmodel.Val.GetType() == typeof(BigNum))
{
return litnewmodel.Val.Equals(litmodel);
}
else if (litnewmodel.Val.GetType() == typeof(BigDec) && litmodel.Val.GetType() == typeof(BigDec))
{
litnewmodel.Val.
}
return (literalExpr.Clone() as Expr);
}
else if (model is IdentifierExpr && newmodel is IdentifierExpr)
{
IdentifierExpr identExpr = expr as IdentifierExpr;
Debug.Assert(identExpr != null);
int index = oldvars.IndexOf(identExpr.Name);
Debug.Assert(index >= 0 && index < newvars.Count());
Expr newExpr = newvars.ElementAt(index);
return (newExpr.Clone() as Expr);
}
else if (expr is NAryExpr)
{
NAryExpr naryExpr = expr as NAryExpr;
List<Expr> newargs = new List<Expr>();
foreach (var exprarg in naryExpr.Args)
{
newargs.Add(replace(exprarg, oldvars, newvars));
}
return new NAryExpr(Token.NoToken, naryExpr.Fun, newargs);
}*/
return model.ToString() == newmodel.ToString();
}
示例2:
this.tree.TabIndex = 0;
//
// StringTemplatePanel
//