what is difference between string array and list of string in c#

Arrays are a lower level abstraction than collections such as lists. The CLR knows about arrays directly, so there’s slightly less work involved in iterating, accessing etc.

However, this should almost never dictate which you actually use. The performance difference will be negligible in most real-world applications. I rarely find it appropriate to use arrays rather than the various generic collection classes, and indeed some consider arrays somewhat harmful. One significant downside is that there’s no such thing as an immutable array (other than an empty one)… whereas you can expose read-only collections through an API relatively easily.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)