-
Notifications
You must be signed in to change notification settings - Fork 22
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
complete Foundations Mastery #30
base: master
Are you sure you want to change the base?
Conversation
|
||
public CustomString(IEnumerable<char> contents) | ||
{ | ||
this.Contents = contents; |
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.
Nice casing
public void Clear() | ||
{ | ||
Contents = new List<char>(); | ||
Contents.ToList().Clear(); |
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.
By default, a new List is empty, so the explicit Clear
isn't technically necessary
{ | ||
concat += a; | ||
} | ||
return concat; |
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.
Looping over each one does work - but is there a way we can treat both of them as strings (Contents
and rhs
)? It's less work than building them one character at a time
inter += conList[i]; | ||
inter += rhsList[i]; | ||
} | ||
return inter; |
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.
Nice!
public string Author { get; set; } | ||
public int DatePublished { get; set; } | ||
public virtual int CircPeriodDay { get; } = 14; | ||
} |
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.
I really like these two classes - library media are a great example of inheritance
This looks good! 👍 |
Submit pull request for exercise