A
A
akass2015-05-23 22:41:01
Programming
akass, 2015-05-23 22:41:01

ObservableCollection C# how to use?

Can't find how to use it anywhere, does anyone know?
I want to add messages to the collection and as soon as new ones appear, immediately display them, I realized that ObservableCollection is just what you need.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stanislav Makarov, 2015-05-24
@akass

Well, here are basically sensible answers on SO: stackoverflow.com/questions/4279185/what-is-the-us... , look and tell me what exactly is not clear.

V
Vyacheslav Zolotov, 2015-05-23
@SZolotov

So they read badly, because these are the basics. What did you want to do? Studio code.

T
Tsiren Naimanov, 2015-05-24
@ImmortalCAT

ObservableCollection<string> OC = new ObservableCollection<string>();
            OC.Add("тратататататарарарарата");
            OC.Add("тратататататарарарарата");
            OC.Add("тратататататарарарарата");
            OC.Add("тратататататарарарарата");
            foreach (var item in OC)
            {
                Console.WriteLine(item);
            }

like so?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question