如何创建与PredicateEditor一起使用的具有常量值的NSExpression。
例如:
leftExpression应为字符串"state",rightExpression应为字符串"Germany“
我试过了:
NSExpression left = new NSExpression(NSExpressionType.ConstantValue);
left.SetValueForKey(new NSString("state"), new NSString("Germany"));但这是行不通的。程序停止,没有错误!
发布于 2017-11-07 02:44:55
使用静态方法NSExpression NSExpression.FromConstant(NSObject)
var left = NSExpression.FromConstant((NSString)"Germany");发布于 2017-11-06 21:46:05
你没有抛出生成的异常:
throw left;https://stackoverflow.com/questions/47137801
复制相似问题