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

Fix example of DRY #108

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ Drawable RenderLargeRectangles(Rectangle rectangles)
{
rectangle.SetWidth(4);
rectangle.SetHeight(5);
var area = rectangle.GetArea(); // BAD: Will return 25 for Square. Should be 20.
var area = rectangle.GetArea(); // BAD: Will return 20 for Square. Should be 25.
SirFX marked this conversation as resolved.
Show resolved Hide resolved
rectangle.Render(area);
}
}
Expand Down Expand Up @@ -2380,7 +2380,7 @@ Getting the abstraction right is critical, that's why you should follow the SOLI
```csharp
public List<EmployeeData> ShowDeveloperList(Developers developers)
{
foreach (var developers in developer)
foreach (var developer in developers)
{
var expectedSalary = developer.CalculateExpectedSalary();
var experience = developer.GetExperience();
Expand Down Expand Up @@ -2421,9 +2421,9 @@ public List<EmployeeData> ShowList(Employee employees)
{
foreach (var employee in employees)
{
var expectedSalary = employees.CalculateExpectedSalary();
var experience = employees.GetExperience();
var githubLink = employees.GetGithubLink();
var expectedSalary = employee.CalculateExpectedSalary();
var experience = employee.GetExperience();
var githubLink = employee.GetGithubLink();
var data =
new[] {
expectedSalary,
Expand Down