Created
March 13, 2012 01:21
-
-
Save dislogical/2026008 to your computer and use it in GitHub Desktop.
Interface between List and Queue to hide certain methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace YOUR_PROJECT_NAMESPACE | |
| { | |
| /// <summary> | |
| /// Class that hides List's methods from Queue</summary> | |
| /// <typeparam name="T"> | |
| /// Type of Queue</typeparam> | |
| /// <author>Colden Cullen</author> | |
| abstract class QueueSaver<T> : List<T> | |
| { | |
| public override sealed void Add( T data ) { } | |
| public override sealed void AddFront( T data ) { } | |
| public override sealed bool Remove( T data ) | |
| { | |
| return false; | |
| } | |
| public override sealed bool RemoveAt( int index ) | |
| { | |
| return false; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment