Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the order of elements on a C# List<T> deterministic?

Tags:

c#

I've always thought otherwise, but recently I had the need to know:

If I add elements to a list in a certain order, am I guaranteed to find then always on the same order?

Thanks!

like image 906
Bruno Brant Avatar asked Dec 09 '10 21:12

Bruno Brant


People also ask

What is the Order of elements in a chemical formula?

Order of Elements in a Chemical Formula. The Hill system states carbon atoms are listed first, hydrogen atoms next and then the number of all other elements in alphabetical order. There are numerous exceptions to this system, such as the order of elements in ionic compounds, as well as the order in oxides, acids and hydroxides.

What is the Order of elements in ionic compounds?

The order of elements in ionic compounds is that the positive (+) ion is listed first and the negative (−) ion is listed second. Oxides end in oxygen, acids start with hydrogen and hydroxides end in OH. My physics book covers an important subject with easy-to-understand explanations.

How are the elements listed on the periodic table?

The periodic table lists the elements in order of increasing atomic number. Each element has a symbol, which is one or two letters. The first letter is always capitalized. If there is a second letter, it is lowercase. The names of some elements indicate their element group. For example, most noble gases have names ending with -on, ...

Which elements are ordered by increasing atomic number?

Here's a list of chemical elements ordered by increasing atomic number. The names and element symbols are provided. Each element has a one or two letter symbol, which is an abbreviated form of its present or old name. The element number is its atomic number, which is the number of protons in each of its atoms. 1 - H - Hydrogen. 2 - He - Helium.


1 Answers

Yes, it is deterministic. Bear in mind that if you want to use List<T> across threads then, as with anything, you can't guarantee the order in which the interactions would happen.

like image 150
OJ. Avatar answered Oct 12 '22 21:10

OJ.