Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# DevExpress:如何使用集合的ObjectFormatter.Format_C#_Collections_Format_Devexpress_Xaf - Fatal编程技术网

C# DevExpress:如何使用集合的ObjectFormatter.Format

C# DevExpress:如何使用集合的ObjectFormatter.Format,c#,collections,format,devexpress,xaf,C#,Collections,Format,Devexpress,Xaf,我已经动态创建了集合元素。 我试着做这样的事情 String format = "{0:Document.Contragent.BDContragentInfo[Field.Caption == 'Email'].Single(Value)}"; String generatedNumber = ObjectFormatter.Format(format, formatObjectHelper); 有一个错误,没有像“Document.contracent.bdcontracentinfo[

我已经动态创建了集合元素。 我试着做这样的事情

String format = "{0:Document.Contragent.BDContragentInfo[Field.Caption == 'Email'].Single(Value)}";
String generatedNumber = ObjectFormatter.Format(format, formatObjectHelper); 
有一个错误,没有像“Document.contracent.bdcontracentinfo[field.Caption=='Email'].Single(Value)”这样的字段

但它对Criteria运算符有效。有没有办法解决这个问题

UPD:
作为一个临时解决方案,使用ObjectSpace.GetEvaluator(…).Evaluate()方法按条件评估对象

我从DE获得了答案。答案是我不能这样做。因此,如果您有这样的问题,请使用UPD部分中我的解决方案或使用DE-answer解决方案