Skip to content

Готовая задача с генериками#12

Open
Palezehvat wants to merge 2 commits intomasterfrom
FilterFoldMap
Open

Готовая задача с генериками#12
Palezehvat wants to merge 2 commits intomasterfrom
FilterFoldMap

Conversation

@Palezehvat
Copy link
Owner

Задача на filter fold map

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это не нужно, уберите :)

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Все три функции на самом деле должны быть в одном классе, а у Вас аж три отдельных (!) проекта с тестами. Упростите структуру решения, пожалуйста :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут и ниже не хватает static-ов, потому как у класса нет своего состояния.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А нельзя так. Кидайте исключение

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
List<TypeOfValue> newList = new List<TypeOfValue>();
List<TypeOfValue> newList = new();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно более общий тип, потому что тип результата не обязан совпадать с типом значений в списке

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments