or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Distinct & Union & Intersect & Except
前言
在 LinQ 中 , 關於集合的運算共有四個方法 , 每一個方法都基於不同的概念而有不同的結果.
Distinct
Distinct 方法會回傳不包含重複值的資料集合. 換句話說 , Distinct 方法會移除資料集合中全部的重複值 , 並且將這個僅包含唯一值的資料集合回傳.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Distinct 的多載
Distinct 的範例
輸出結果
1
2
3
5
輸出結果
apple 9
orange 4
lemon 12
簡單實作自己的 Distinct
Distinct 的 Source Code
Union
Union 方法會回傳聯集集合. 換句話說 , 它會合併兩個不同的資料集合為一個 , 並且此合併後的資料集合沒有任何的重複值.
Union 的多載
Union 的範例
輸出結果
1
2
3
5
輸出結果
apple 9
orange 4
lemon 12
簡單實作自己的 Union
Union 的 Source Code
Intersect
Intersect 方法回傳交集. 換句話說 , 回傳的資料集合元素必定可在兩個資料集合中各找到一份找到相同的元素.
Intersect 的多載
Intersect 的範例
輸出結果
1
輸出結果
orange 4
lemon 12
簡單實作自己的 Intersect
Intersect 的 Source Code
Except
Except 方法回傳差集. 換句話說 , 回傳的資料集合元素內容是以集合一為基礎 , 並且扣除與資料集合二中相同元素後的結果.
Except 的多載
Except 的範例
輸出結果
2
輸出結果
apple 9
簡單實作自己的 Except
Except 的 Source Code
參考
Set Operations in LINQ
LINQ | Set Operator | Distinct
LINQ | Set Operator | Union
LINQ | Set Operator | Intersect
LINQ | Set Operator | Except
Thank you!
You can find me on
若有謬誤 , 煩請告知 , 新手發帖請多包涵
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →