Skip to content

Commit b087ba2

Browse files
Added indexer operator
1 parent 5c70bb5 commit b087ba2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,6 @@ paket-files/
261261
# Python Tools for Visual Studio (PTVS)
262262
__pycache__/
263263
*.pyc
264+
/Chunk List/Presentation/Chunk List Backup.pdf
265+
/.vscode
266+
/Chunk List/Presentation/Chunk List-review01092019.pdf

Chunk List/ChunkList.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,17 @@ public T get(int index)
434434
return get(index + 1);
435435
}
436436
}
437+
438+
/// <summary>
439+
/// Override indexer operator (get or set element at specified index)
440+
/// </summary>
441+
/// <param name="index"></param>
442+
/// <returns></returns>
443+
public T this[int index]
444+
{
445+
get { return get(index); }
446+
set { set(index, value); }
447+
}
437448

438449
/// <summary>
439450
/// Prints out all items currently in list, in order by chunk

0 commit comments

Comments
 (0)