u/Alert-Neck7679

▲ 0 r/csharp

It feels like the language would be so much more flexible if they were, wouldn’t it? I started thinking about this while looking for a list implementation that automatically reacts to collection changes (by the way, do you know one?). If C# worked that way, I could simply write something like:

public class ModAlertList<T> : List<T>
{
    public event EventHandler CollectionChanged;

    public override void Add(T item)
    {
        base.Add(item);
        CollectionChanged?.Invoke(this, EventArgs.Empty);
    }

    // ... same for Remove()
}

And there are tons of other examples like this.
So what’s the reason?

reddit.com
u/Alert-Neck7679 — 7 days ago

I have an existing MonoGame project using .NET10, and i want to make an in-browser version for it using KNI engine, but their templates use .NET8 and i couldn't make it working with 10. Does anyone have a sample I can use?

Thanks in advance.

reddit.com
u/Alert-Neck7679 — 20 days ago