-
Notifications
You must be signed in to change notification settings - Fork 37
CSharp example #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
CSharp example #18
Conversation
1. Changed access modifier of Node fields 2. Updated return functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You may add a reference on head/first element to keep order in which element was added.
- Lists should implement at least IEnumerable interface.
- You may add some functionality to your classes, e.g. Contains, Remove, Count methods. Also, you may overload index operator.
{ | ||
internal T item; | ||
internal Node next; | ||
internal Node previous; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifier can be public because class Node
is inner private, so fields can be accessed only in DoubleLinkedList
class scope.
{ | ||
List<T> res = new List<T>(); | ||
Node temp = last; | ||
T item = default(T); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for item
initialization.
No description provided.