1. Dark Mode
Logo
Avatar

Michael's Blog

If it's worth doing, it's worth doing right.

  1. Home
  2. Archives
  3. Search

    C# Blooper №13: 'Stack' and 'Queue' do not implement 'ICollection'

    2013-01-04 Fri 11:44:32 UTC
    1 minute read

    Before reading any further, please read the disclaimer in the C# Bloopers post.

    This is a blooper of the Common Language Runtime (CLR), not of the language itself: Stack<T> and Queue<T> derive from ICollection, but not from ICollection<T>, so they do not support the Remove( T ) method! Why, oh why?

    C# Software Engineering
    Last updated on 2025-10-23 Thu 07:13:16 CEST

    Related content

    Immutability Assessment

    Human-readable names of dotnet types in C# notation

    Build configurations

    Testana: A better way of running tests

    New GitHub project: VsDebugLogger

    © 2001 - 2026 Michael Belivanakis (a.k.a. Mike Nakis)
    Made using Obsidian and Hugo
    Theme based on hugo-theme-stack by Jimmy Cai