Which .NET classes implements IDisposable RRS feed

  • Question

  • Hi All,

    Which .NET classes  implement IDisposable?

    Thanks in advance.

    Thursday, April 23, 2020 1:39 PM


  • Take a look at the following


    Then this from here

    IEnumerable<Type> disposableTypes =
        from assm in AppDomain.CurrentDomain.GetAssemblies()
        from type in assm.GetTypes()
        where typeof(IDisposable).IsAssignableFrom(type)
        select type;
    foreach (var itemDisposableType in disposableTypes)

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Thursday, April 23, 2020 1:54 PM

All replies