У меня самые странные ошибки.
Dim lines As List(Of NewOrderCsv) = (From record In _records Where record.Ticket2 = orderHeaderRow.Ticket2)
Их ошибка происходит здесь при моем объявлении объекта линии
For Each line As NewOrderCsv In lines
CreateSopOrderLine(orderHeaderRow, newMcsOrder, newMcsOrder.AnalysisCode1, orderHeaderRow.String15, newMcsOrder.AnalysisCode1, newMcsOrder.ContactName, orderHeaderRow.String3, line)
Next
Я в основном программист на c #, так что простите, если это легко в vb.net
{"Невозможно привести объект типа
'WhereListIterator 1[AveryIntegration.Common.CSV.Records.NewOrderCsv]'
to type
'System.Collections.Generic.List
1 [AveryIntegration.Common.CSV.Records.NewOrderCsv]'. "}
Класс для NewOrderCSV - это файл помощников
Namespace CSV.Records
<DelimitedRecord(",")>
Public Class NewOrderCsv
<FieldConverter(GetType(CustomStringConvertor))>
<FieldQuoted>
Public String2 As String
<FieldConverter(GetType(CustomStringConvertor))>
<FieldQuoted>
Public String3 As String
<FieldConverter(GetType(CustomStringConvertor))>
<FieldQuoted>
Public String4 As String
<FieldConverter(GetType(CustomStringConvertor))>
<FieldQuoted>
Public String5 As String
<FieldConverter(GetType(CustomStringConvertor))>
<FieldQuoted>
Public String10 As String
<FieldConverter(GetType(CustomStringConvertor))>
<FieldQuoted>
Public String15 As String
Public Decimal1 As Decimal
Public Decimal5 As Decimal
Public Decimal8 As Decimal
Public Decimal9 As Decimal
Public Decimal10 As Decimal
Public Date1 As DateTime
Public Ticket2 As Integer
<DebuggerNonUserCode>
Public Sub New()
MyBase.New()
End Sub
End Class