What is different on 2 system.object

Hello All,

I have scipt what is reading csv file and generate there graphs.
I don’t understand what is difference $data and $res.
Because $data is not working but $res does work.

	
$DataFileName = "c:\temp\sample.file"

$data = Import-CSV $DataFileName -Delimiter "`t"  

$data = $data | 	
Select-Object @{Name="DateTime"; Expression={[datetime]::parseexact($_."DateTime","dd.MM.yyyy HH:mm:ss",$null)}} ,
	      @{Name="Delay"; Expression={[int]$_."RoundtripTime"}} 
			  
$res = foreach ( $i in $Data ) {
    [PSCustomObject]@{
        DateTime = ([datetime]$i."DateTime")
        Delay = ([int]$i."Delay")	
    }
}		
...
...
...
# Graph Creation
# Not Working
$chart.Series["Delay"].Points.DataBindXY($data.DateTime, $data.Delay)

# Working
$chart.Series["Delay"].Points.DataBindXY($res.DateTime, $res.Delay)
$data.gettype()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Object[]                                 System.Array

$res.gettype()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Object[]                                 System.Array

AFAIK, no difference. Both results in same type of object. Select-Object is the neat and clean approach unless there is nothing more to do in a foreach other than object creation.