我知道这听起来可能很疯狂,但我发誓,在两次不同的情况下,通过智能感知,我看到 DataView 构造函数的重载,该构造函数接受 DataTable 和 Predicate 或 Func,我不记得 T 是什么,无论是 DataRow 还是数据行视图。 但现在我找不到了。 它还接受了另一个参数,我想说这是一个比较,但我不太关心这个事实。 问题是,我再也找不到那个超载了。
查看定义,我发现 DataView 只有 3 个构造函数。 我特别记得在智能感知中,这个“消失的构造函数”说的是“4 of 4”。
有人可以帮我解开这个谜吗? 请告诉我,我不是妄想,并且确实看到了这个构造函数(或类似的东西)。 也许它实际上不是一个构造函数而是一个扩展方法?
I know this may sound crazy, but I swear that on two separate ocassions via intellisense I've seen an overload for the DataView constructor that took in a DataTable and either Predicate or Func, I don't remember what T was, either DataRow or DataRowView. But now I can't find it. It also took in another parameter, I want to say it was a Comparison, but I'm less about that fact. The problem is, I can no longer find that overload.
Looking at the definition, I see that there is only 3 constructors for DataView. I specifically remember that in intellisense for this "disappearing constructor" said "4 of 4".
Can someone please help me solve this mystery? Please tell me that I'm not delusional and did in fact see this constructor (or something like it). Maybe it wasn't actually a constructor and was an extension method?
发布评论
评论(2)
有五个构造函数,但其中两个(包括一个采用谓词和一个比较的构造函数)是 System.Data 程序集的内部构造函数。 我不知道为什么 Intellisense 会向你展示这一点......
There are five constructors, but two of them (including one taking a predicate and a comparison) are internal to the
System.Data
assembly. I don't know why Intellisense would show that to you though...抱歉 - 不幸的是只有 3 个公共构造函数:
http://msdn.microsoft.com/en-us/library/system.data.dataview.dataview.aspx
Sorry - unfortunately there are only 3 public constructors:
http://msdn.microsoft.com/en-us/library/system.data.dataview.dataview.aspx