在Linq中.......编译器如何从子句中了解 [英] In Linq.......how compiler understands from clause

查看:61
本文介绍了在Linq中.......编译器如何从子句中了解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是linq的新手.为什么select子句在from子句之后?请不要粘贴
这样的答案
原因是,LINQ与C#或其他编程语言一起使用,这要求首先声明所有变量.LINQ查询的From子句仅定义选择记录的范围或条件.因此,为什么FROM子句必须出现在Select in中LINQ."

我不了解范围或条件的含义.

在此先感谢

I am new to linq..Please make me clear. Why select clause comes after from clause? Please don''t paste answer like

"The reason is, LINQ is used with C# or other programming languages, which requires all the variables to be declared first. From clause of LINQ query just defines the range or conditions to select records. So that’s why from clause must appear before Select in LINQ."

i din''t understand the meaning of range or conditions what it means.

thanks in advance

推荐答案

在CP上查看此文章, ^ ]


Google [
Check this article on CP, Understanding LINQ (C#)[^]


Lots of articles on Google[^] too


因为如果您以SELECT子句开头,Visual Studio Intellisense将不知道您正在使用什么数据类型.

就是这样.
Because if you start with the SELECT clause, Visual Studio Intellisense will not know what datatype you are using.

That''s it.


这篇关于在Linq中.......编译器如何从子句中了解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆