Answer the question
In order to leave comments, you need to log in
What is the output of a lambda expression?
static int FindZachetka(List<ExamPass> spisok, string zachetka)
{
spisok.FindIndex(s => s.zachetka == zachetka)
{
????
}
};
Answer the question
In order to leave comments, you need to log in
The correct place for the error is something like this:
In general, it would be better to do something like this:
static ExamPass FindZachetka(List<ExamPass> spisok, string zachetka)
{
return spisok.Find(s => s.zachetka == zachetka);
}
I don’t understand why the second curly braces, the labda is looking for the occurrence of the offset in the collection, I suppose the value should be assigned, but this is not accurate :) , as far as I can tell, it returns only the index, without further processing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question