arrays - Whats the difference between ArraySystem.Object and System.Object in C#? -


i created array on objects containing different type objects , checked type of each element. converted array in list , checked types of each elements results different ?

object[] aobj = {"",4,2.5,7,new object()}; foreach (var element in aobj) {     console.writeline("type array"+element.gettype()); }   ilist lsit = aobj ilist;  foreach (var element in lsit) {     console.writeline("type in list " + element.gettype()); } 

output:

enter image description here

why there arraysystem.object , system.object ? whats difference ?

look @ output code

console.writeline("type array"+element.gettype()); 

the type not arraysystem.string (etc.). word "array" comes code. missing space after array make output clean.


Comments