Use of LINQ and ArrayList

前端 未结 3 1079
借酒劲吻你
借酒劲吻你 2021-01-05 10:42

I\'ve recently used LINQ

In the following code:

ArrayList list = new ArrayList();
var myStrings = list.AsQueryable().Cast();

3条回答
  •  借酒劲吻你
    2021-01-05 10:56

    AsQueryable would be used to produce an IQueryable which can then, if implemented, analyse the query via expression trees to rewrite it or translate it into some other language-like with linq to sql for example.

    In this case it is completely pointless and you can tell your friend not to bother.

提交回复
热议问题