开发者

Does DataTable implement IListSource?

开发者 https://www.devze.com 2023-03-17 17:30 出处:网络
The documentation (and intellisense) states very clearly that DataTable implements IListSource. But then why doesn\'t DataTable have a getList()开发者_JS百科 method, which is (the main) part of the IL

The documentation (and intellisense) states very clearly that DataTable implements IListSource. But then why doesn't DataTable have a getList()开发者_JS百科 method, which is (the main) part of the IListView interface?


DataTable uses Explicit Interface Implementation to implement IListSource.

You can still use the method via:

 IListSource listSource = (IListSource)dataTable;
 IList list = listSource.GetList();
0

精彩评论

暂无评论...
验证码 换一张
取 消