Commit a8c1705
authored
Add examples of a spread element to the "Collection initializers" article (#44045)
* Add example of spread operator for collection initializers
* Inlcude the spread element example in the text
* Include additional syntax for manually creating additional element
* Include spread element in full example code
* Remove unnecessary System.Xml.Linq1 parent 3c2efb6 commit a8c1705
File tree
2 files changed
+27
-15
lines changed- docs/csharp/programming-guide/classes-and-structs
- snippets/object-collection-initializers
2 files changed
+27
-15
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
152 | 160 | | |
153 | 161 | | |
154 | 162 | | |
| |||
Lines changed: 19 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
101 | 109 | | |
102 | 110 | | |
103 | 111 | | |
| |||
182 | 190 | | |
183 | 191 | | |
184 | 192 | | |
185 | | - | |
186 | | - | |
| 193 | + | |
187 | 194 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 195 | + | |
| 196 | + | |
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
| |||
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
| |||
0 commit comments