C# - Sample Interview Question (Senior Level)

What is true regarding the following approaches?

Approach A:

list.ForEach( item =>
{
    item.Foo();
} );

Approach B:

foreach(Item item in list)
{
     item.Foo();
}

  1. Approach A is clearer and easier to read
  2. Type checking with approach B is done at runtime, while approach A is doing type checking at compile time
  3. Approach B could be chained
  4. None of the above.
Tests in C# for Seniors

Test Name Difficulty Time (minutes) No. of Questions
C# Online Test for Seniors C# Senior 60 30

More Specific Tests in C# for Seniors

Test Name Difficulty Time (Minutes) No. of Questions
C-Sharp-Arrays-and-Collections Online Test for Seniors C Sharp - Arrays and Collections Senior 20 10
C-Sharp-Language-Fundamentals Online Test for Seniors C Sharp - Language Fundamentals Senior 20 10
C-Sharp-Threading Online Test for Seniors C Sharp - Threading Senior 20 10
C-Sharp-Files-and-Streams Online Test for Seniors C Sharp - Files and Streams Senior 20 10
C-Sharp-LINQ-Query-Expressions Online Test for Seniors C Sharp - LINQ Query Expressions Senior 20 10