10
lxmcf
3y

So COSMOs hasn't implemented a proper clearing method for lists... Having to do this to clear my output list hurts!

Comments
  • 0
  • 4
    If the default .Clear() isn't there for whatever reason, make it at least an extension method
    public static class Extensions
    {
    public static List<T> Clear (this List<T> target)
    {
    return new List<T>();
    }
    }
    Dunno if that works correctly, but it should like similar to this. After that you can just call .Clear() again
  • 1
    output.removeAll() ?
  • 1
    @BindView doesn't work, hasn't been ported into the kernel -,-

    @Kimmax thanks! Didn't actually think to do that
  • 1
    Oh shit, F
  • 1
    @BindView yeah, Cosmos is an effort to build an OS using the .net framework, but they have to essentially port almost everything :-(
  • 0
    Poor garbage collector...
Add Comment