A

Admin • 828.03K Points
Coach

Q. What will be the output?

Code:
var list = new List<int>{1,2,3};
list.Remove(2);
Console.WriteLine(list.Count);
  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 0

Explanation by: Admin
One element is removed, remaining count is 2.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.