Today we found one more interesting thing of converting List to ObservableCollection , Its something you will need regularly when you are working with WPF / Silverlight application – because ObservableCollection typically automatically synchronized when its get updated !
Here is the code may helpful to you ! , Its extension method to convert into ObservableCollection
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> enumerableList)
{return enumerableList != null ? new ObservableCollection<T>(enumerableList) : null;
}
Happy Coding !
Recent Comments