TAILIEUCHUNG - Professional C# 2008 phần 3

Mô tả lọc các nhà khai thác xác định một hạn chế các yếu tố trở lại. Với sự điều hành truy vấn, bạn có thể sử dụng một vị, ví dụ, xác định bởi một biểu thức Lambda trả về một bool. OfType lọc các yếu tố dựa vào loại và trả về các yếu tố của các loại TResult. Các nhà khai thác chiếu được sử dụng | Part I The C Language Standard Query Operators Description Where OfType TResult Filtering operators define a restriction to the elements returned. With the Where query operator you can use a predicate for example defined by a Lambda expression that returns a bool. OfType TResult filters the elements based on the type and returns only the elements of the type TResult . Select SelectMany Projection operators are used to transform an object into a new object of a different type. Select and SelectMany define a projection to select values of the result based on a selector function. OrderBy ThenBy OrderByDescending ThenByDescending Reverse Sorting operators change the order of elements returned. OrderBy sorts values in ascending order OrderByDescending sorts values in descending order. ThenBy and ThenByDescending operators are used for a secondary sort if the first sort gives similar results. Reverse reverses the elements in the collection. Join GroupJoin Join operators are used to combine collections that might not be directly related to each other. With the Join operator a join of two collections based on key selector functions can be done. This is similar to the JOIN you know from SQL. The GroupJoin operator joins two collections and groups the results. GroupBy Grouping operators put the data into groups. The GroupBy operator groups elements with a common key. Any All Contains Quantifier operators return a Boolean value if elements of the sequence satisfy a specific condition. Any All and Contains are quantifier operators. Any determines if any element in the collection satisfies a predicate function All determines if all elements in the collection satisfy a predicate. Contains checks whether a specific element is in the collection. These operators return a Boolean value. Take Skip TakeWhile SkipWhile Partitioning operators return a subset of the collection. Take Skip TakeWhile and SkipWhile are partitioning operators. With these you get a partial result. With Take .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.