System.Collections.Generic.List.Remove(Widget)

Here are the examples of the csharp api System.Collections.Generic.List.Remove(Widget) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : Overlay.cs
with MIT License
from Haato3o

public static bool UnregisterWidget(Widget widget)
        {
            try
            {
                widgets.Remove(widget);
                return true;
            } catch (Exception err)
            {
                Debugger.Error(err);
                return false;
            }
        }

19 Source : WidgetManager.cs
with GNU General Public License v3.0
from pabllopf

public static void Delete(Widget widget)
        {
            Widget widgettemp = current.widgets.Find(i => i.GetType().Equals(widget.GetType()));
            if (widgettemp != null)
            {
                current.widgets.Remove(widgettemp);
            }
        }