Skip to content

Firdavs home work 04#27

Open
FirdavsAX wants to merge 2 commits intomasterfrom
Firdavs-homeWork-04
Open

Firdavs home work 04#27
FirdavsAX wants to merge 2 commits intomasterfrom
Firdavs-homeWork-04

Conversation

@FirdavsAX
Copy link
Copy Markdown
Member

No description provided.

Comment on lines +94 to +96
.Where(x => predicate(x))
.ToList()
.Count;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where()
.ToList()
.Count

o'rniga
Count(x => predicate(x))
qilsa bo'ladi, bu tarzda ko'd ihchamroq va keraksiz kontekstdan xalos bo'ladi.

}

static void ExecuteOperation(int a, int b, Func<int, int, int> func, Action<int> display)
static int Max(int[] array, Predicate<int>predicate)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

predicate o'zgaruvchanini e'lon qilishdan oldin bitta bo'shliq qoldirish kerak, barchasi bir narsadek tuyilmasligi uchun. Sababi Predicate bu o'zgaruvchanni toifasi, predicate esa o'zgaruvchanni (parameterni) nomi.

static decimal[] Convert(decimal[] array, Func<decimal, decimal> converter)
{
return a - b;
List<decimal> list = new List<decimal>();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

decimal[] arrayni e'lon qilib shu massivga elementlarni qo'shib ketilsa, keraksiz List e'lon qilinmaydi hamda xotiradan joy olinmaydi.

Copy link
Copy Markdown
Contributor

@Mirazyzz Mirazyzz left a comment

Choose a reason for hiding this comment

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

Kichik kamchiliklar bor. Umuman olganda, yaxshi. 5dan 4.5

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.

2 participants