Skip to content

LinqSelect1

⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠

Text Elements

List names = new List{“John”, “Rick”, “Maggie”, “Mary”};

IEnumerable nameQuery = from name in names where name[0] == ‘M’ select name;

foreach (string str in nameQuery) { Console.WriteLine(str); }

1

2

3

%%

Drawing

{
"type": "excalidraw",
"version": 2,
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.0.3",
"elements": [
{
"type": "rectangle",
"version": 361,
"versionNonce": 1110997983,
"isDeleted": false,
"id": "Yzmh7Jog7Q4Vy_bxpgyOl",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -475.1796875,
"y": 33.232421875,
"strokeColor": "transparent",
"backgroundColor": "#ffd43b",
"width": 60.76953125000001,
"height": 23.57421874999999,
"seed": 1051812383,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 3
},
"boundElements": [],
"updated": 1700684827728,
"link": null,
"locked": false
},
{
"type": "rectangle",
"version": 394,
"versionNonce": 1004274769,
"isDeleted": false,
"id": "hZNkcvFRa3XTRPbevd66t",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -446.40625,
"y": -119.498046875,
"strokeColor": "transparent",
"backgroundColor": "#ffd43b",
"width": 66.32812500000001,
"height": 19.925781249999986,
"seed": 1561007921,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 3
},
"boundElements": [
{
"id": "rAK88CeLixRa3W3oIlsAe",
"type": "arrow"
},
{
"id": "076IYjKTXn7OktlrCem6m",
"type": "arrow"
}
],
"updated": 1700684897888,
"link": null,
"locked": false
},
{
"type": "rectangle",
"version": 361,
"versionNonce": 1580935281,
"isDeleted": false,
"id": "4RECjLuZ8q13L33MALpC2",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -162.51171875,
"y": -67.560546875,
"strokeColor": "transparent",
"backgroundColor": "#ffd43b",
"width": 56.08203124999999,
"height": 15.582031249999986,
"seed": 1073938015,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 3
},
"boundElements": [
{
"id": "rAK88CeLixRa3W3oIlsAe",
"type": "arrow"
}
],
"updated": 1700684869330,
"link": null,
"locked": false
},
{
"type": "rectangle",
"version": 379,
"versionNonce": 273816433,
"isDeleted": false,
"id": "Kdpvc7R7ISt4DB_hZULvq",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -184.765625,
"y": -118.798828125,
"strokeColor": "transparent",
"backgroundColor": "#ffd43b",
"width": 55.597656249999986,
"height": 17.855468749999993,
"seed": 1389898335,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 3
},
"boundElements": [],
"updated": 1700684827729,
"link": null,
"locked": false
},
{
"type": "rectangle",
"version": 226,
"versionNonce": 2014020927,
"isDeleted": false,
"id": "JEisNGPZ6J3wsclSWBuoE",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -527.6484375,
"y": -281.02734375,
"strokeColor": "transparent",
"backgroundColor": "#ffd43b",
"width": 74.03125,
"height": 18.371093749999986,
"seed": 1082818801,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 3
},
"boundElements": [
{
"id": "vr3qnIA7HrVgsYV-2rXqI",
"type": "arrow"
},
{
"id": "SCaWxD7FfKTImp_5fo51v",
"type": "arrow"
}
],
"updated": 1700684830232,
"link": null,
"locked": false
},
{
"type": "text",
"version": 132,
"versionNonce": 304530622,
"isDeleted": false,
"id": "OOD4P9iH",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -567.7421875,
"y": -283.921875,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 543.0796508789062,
"height": 50,
"seed": 321612209,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1700684971346,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "List<string> names =\n new List<string>{\"John\", \"Rick\", \"Maggie\", \"Mary\"};",
"rawText": "List<string> names =\n new List<string>{\"John\", \"Rick\", \"Maggie\", \"Mary\"};",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "List<string> names =\n new List<string>{\"John\", \"Rick\", \"Maggie\", \"Mary\"};",
"lineHeight": 1.25,
"baseline": 43
},
{
"type": "text",
"version": 187,
"versionNonce": 887914879,
"isDeleted": false,
"id": "yyjpOuVq",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -567.671875,
"y": -122.19921875,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 553.0398559570312,
"height": 75,
"seed": 1047855615,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [
{
"id": "SCaWxD7FfKTImp_5fo51v",
"type": "arrow"
}
],
"updated": 1700684830232,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "IEnumerable<string> nameQuery = from name in names\n where name[0] == 'M'\n select name;",
"rawText": "IEnumerable<string> nameQuery = from name in names\n where name[0] == 'M'\n select name;",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "IEnumerable<string> nameQuery = from name in names\n where name[0] == 'M'\n select name;",
"lineHeight": 1.25,
"baseline": 68
},
{
"type": "text",
"version": 75,
"versionNonce": 498197521,
"isDeleted": false,
"id": "4AWahUxc",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -564.03125,
"y": 30.76953125,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 328.2997131347656,
"height": 100,
"seed": 166413745,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [
{
"id": "076IYjKTXn7OktlrCem6m",
"type": "arrow"
}
],
"updated": 1700684897888,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "foreach (string str in nameQuery)\n{\n Console.WriteLine(str);\n}",
"rawText": "foreach (string str in nameQuery)\n{\n Console.WriteLine(str);\n}",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "foreach (string str in nameQuery)\n{\n Console.WriteLine(str);\n}",
"lineHeight": 1.25,
"baseline": 93
},
{
"type": "arrow",
"version": 39,
"versionNonce": 1670911071,
"isDeleted": false,
"id": "vr3qnIA7HrVgsYV-2rXqI",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -508.4296875,
"y": -256.05078125,
"strokeColor": "transparent",
"backgroundColor": "#ffd43b",
"width": 130.80078125,
"height": 90.55859375,
"seed": 556051455,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 2
},
"boundElements": [],
"updated": 1700684827729,
"link": null,
"locked": false,
"startBinding": {
"elementId": "JEisNGPZ6J3wsclSWBuoE",
"focus": 0.8075302472879475,
"gap": 6.60546875
},
"endBinding": null,
"lastCommittedPoint": null,
"startArrowhead": null,
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
130.80078125,
90.55859375
]
]
},
{
"type": "arrow",
"version": 728,
"versionNonce": 1874122879,
"isDeleted": false,
"id": "SCaWxD7FfKTImp_5fo51v",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -513.55859375,
"y": -255.01171875,
"strokeColor": "#1e1e1e",
"backgroundColor": "#ffd43b",
"width": 349.5625,
"height": 131.26953125,
"seed": 2125270225,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 2
},
"boundElements": [
{
"type": "text",
"id": "fXcKaAgb"
}
],
"updated": 1700684853633,
"link": null,
"locked": false,
"startBinding": {
"elementId": "JEisNGPZ6J3wsclSWBuoE",
"focus": 0.7920485533848077,
"gap": 7.64453125
},
"endBinding": {
"elementId": "yyjpOuVq",
"focus": 0.5037817435911769,
"gap": 1.54296875
},
"lastCommittedPoint": null,
"startArrowhead": null,
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
44.921875,
67.14453125
],
[
315.21875,
74.30859375
],
[
349.5625,
131.26953125
]
]
},
{
"type": "text",
"version": 4,
"versionNonce": 1043407103,
"isDeleted": false,
"id": "fXcKaAgb",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -331.7345838423186,
"y": -196.5644395190257,
"strokeColor": "#1e1e1e",
"backgroundColor": "#ffd43b",
"width": 5.4199981689453125,
"height": 25,
"seed": 1531051281,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1700684858672,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "1",
"rawText": "1",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "SCaWxD7FfKTImp_5fo51v",
"originalText": "1",
"lineHeight": 1.25,
"baseline": 18
},
{
"type": "arrow",
"version": 361,
"versionNonce": 328038175,
"isDeleted": false,
"id": "rAK88CeLixRa3W3oIlsAe",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -134.96875,
"y": -49.28515625,
"strokeColor": "#1e1e1e",
"backgroundColor": "#ffd43b",
"width": 284.5546875,
"height": 75.6171875,
"seed": 263073087,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 2
},
"boundElements": [
{
"type": "text",
"id": "mubl9yq7"
}
],
"updated": 1700684887134,
"link": null,
"locked": false,
"startBinding": {
"elementId": "4RECjLuZ8q13L33MALpC2",
"focus": -0.2653255882506265,
"gap": 2.693359375000014
},
"endBinding": {
"elementId": "hZNkcvFRa3XTRPbevd66t",
"focus": 0.3410809811618694,
"gap": 4.244140625000007
},
"lastCommittedPoint": null,
"startArrowhead": null,
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
-27.890625,
29.57421875
],
[
-250.3828125,
27.3828125
],
[
-284.5546875,
-46.04296875
]
]
},
{
"type": "text",
"version": 4,
"versionNonce": 99970975,
"isDeleted": false,
"id": "mubl9yq7",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -283.76421010740046,
"y": -26.943656177904003,
"strokeColor": "#1e1e1e",
"backgroundColor": "#ffd43b",
"width": 14.239990234375,
"height": 25,
"seed": 523764849,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1700684890741,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "2",
"rawText": "2",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "rAK88CeLixRa3W3oIlsAe",
"originalText": "2",
"lineHeight": 1.25,
"baseline": 18
},
{
"type": "arrow",
"version": 77,
"versionNonce": 859950527,
"isDeleted": false,
"id": "076IYjKTXn7OktlrCem6m",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -438.26171875,
"y": -90.8984375,
"strokeColor": "#1e1e1e",
"backgroundColor": "#ffd43b",
"width": 2.09765625,
"height": 119.05859375,
"seed": 375870431,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 2
},
"boundElements": [
{
"type": "text",
"id": "YgIzzhMY"
}
],
"updated": 1700684899383,
"link": null,
"locked": false,
"startBinding": {
"elementId": "hZNkcvFRa3XTRPbevd66t",
"focus": 0.7602937395958518,
"gap": 8.673828125000007
},
"endBinding": {
"elementId": "4AWahUxc",
"focus": -0.2142373594562702,
"gap": 2.609375
},
"lastCommittedPoint": null,
"startArrowhead": null,
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
2.09765625,
119.05859375
]
]
},
{
"type": "text",
"version": 2,
"versionNonce": 1955244543,
"isDeleted": false,
"id": "YgIzzhMY",
"fillStyle": "solid",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -444.02288818359375,
"y": -43.869140625,
"strokeColor": "#1e1e1e",
"backgroundColor": "#ffd43b",
"width": 13.6199951171875,
"height": 25,
"seed": 1340265425,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1700684900661,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "3",
"rawText": "3",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "076IYjKTXn7OktlrCem6m",
"originalText": "3",
"lineHeight": 1.25,
"baseline": 18
}
],
"appState": {
"theme": "light",
"viewBackgroundColor": "#ffffff",
"currentItemStrokeColor": "#1e1e1e",
"currentItemBackgroundColor": "#ffd43b",
"currentItemFillStyle": "solid",
"currentItemStrokeWidth": 1,
"currentItemStrokeStyle": "solid",
"currentItemRoughness": 1,
"currentItemOpacity": 100,
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemTextAlign": "left",
"currentItemStartArrowhead": null,
"currentItemEndArrowhead": "arrow",
"scrollX": 703,
"scrollY": 592.6171875,
"zoom": {
"value": 1
},
"currentItemRoundness": "round",
"gridSize": null,
"gridColor": {
"Bold": "#C9C9C9FF",
"Regular": "#EDEDEDFF"
},
"currentStrokeOptions": null,
"previousGridSize": null,
"frameRendering": {
"enabled": true,
"clip": true,
"name": true,
"outline": true
}
},
"files": {}
}

%%