This seems like a silly question, but I haven't found the answer, so here it is. :)
In both cases, you will get an "out-of-range" exception if you fail to check the bounds of your collection. Is this just coding style preference?
And in case someone needs an example:
List<byte> myList = new List<byte>(){0x01, 0x02, 0x03};
byte testByte = myList.ElementAt(2);
versus
byte testByte = myList[2];
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…