how to add a list to observablecollection in c#
var stringList = new List<string>() {"1","2","3"};
//Use the contructor override to add the list to the new collection
var obStrings = new ObservableCollection<string>(stringList);
//If you already have a collection. Store that into a tempory list,
//add the new range to the tempory list. Then same as above
var ob2list = obStrings.ToList();
ob2list.AddRange(stringList);
obStrings = new System.Collections.ObjectModel.ObservableCollection<string>(ob2list);
Also in C#:
- c# how to initialize an array
- unity deactivate scripts in list
- unity check when clicked on object
- formula calculating distance coordinates latitude longitude c#
- c# round number up
- c# graphics draw filled rectangle
- unity how to move an object
- return a list of list from yaml via C#
- c# new dictionary linq
- unity line renderer position count
- debug.log
- unity get all children
- unity assign button onclick
- stop unity editor playing
- c# console writeline color
- Assets\playermove.cs(30,37): error CS1003: Syntax error, ',' expected
- how to put double quotes in a string c#
- c sharp tryparse
- how to disable device guard or credential guard vmware
- sum the digits in c#
- unity try get component
- chase object unity
- onmouseover unity
- c# index in select