daily pastebin goal
71%
SHARE
TWEET

Untitled

a guest May 16th, 2018 99 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. public class SettingsMenu
  2. {
  3.     public string Name { set; get; }
  4.     public ObservableCollection<object> Items { set; get; }
  5.  
  6.     public SettingsMenu()
  7.     {
  8.         Name = "";
  9.         Items = new ObservableCollection<object>();
  10.     }
  11.  
  12.     public SettingsMenu(string _name, ObservableCollection<object> _items)
  13.     {
  14.         Name = _name;
  15.         Items = _items;
  16.     }
  17.  
  18.     public void AddItem(object _item)
  19.     {
  20.         Items.Add(_item);
  21.     }
  22. }
  23.    
  24. MenuInts = new SettingsMenu("Menu1", new ObservableCollection<int>());
  25.     MenuStrings = new SettingsMenu("Menu2", new ObservableCollection<string>());
  26.     MenuBools = new SettingsMenu("Menu3", new ObservableCollection<bool>());
  27.    
  28. Cannot convert from
  29. 'System.Collections.ObjectModel.ObservableCollection<type>' to
  30. 'System.Collections.ObjectModel.ObservableCollection<object>'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top