iNNOKENTIY21
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Код: class Car { [string]$Marka [string]$Model [double]$Price Car([string]$Marka, [string]$Model, [double]$Price) { $this.Marka = $Marka $this.Model = $Model $this.Price = $Price } [string] ToString() { return "{0} {1} — `${2}" -f $this.Marka, $this.Model, $this.Price } } [Car[]]$Cars = @( [Car]::new('ЗАЗ', '969', 900) [Car]::new('ВАЗ', '2106', 1900) [Car]::new('УАЗ', '469', 1400) ) $Path = Split-Path -Path $MyInvocation.InvocationName -Parent $FullName = Join-Path -Path $Path -ChildPath 'Cars.csv' $Cars | Export-Csv -Path $FullName -Encoding Unicode -Force # Что нужно сделать, что бы это заработало? [Car[]]$ImportedCsv = Import-Csv -Path $FullName -Encoding Unicode $ImportedCsv $Cars = $null $ImportedCsv = $null | disclaimer: Скрипт использует сохранение в файл Cars.csv в папку где сохранён скрипт |