Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GAylabea
Copy link

@GAylabea GAylabea commented Mar 4, 2017

Submit pull request for exercise


public CustomString(IEnumerable<char> contents)
{
this.Contents = contents;

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();

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;

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;

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;
}

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

@BlaiseGratton
Copy link

This looks good! 👍

@BlaiseGratton BlaiseGratton self-assigned this Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants