Click here to Skip to main content
15,881,882 members

Comments by Techhi (Top 5 by date)

Techhi 4-Mar-12 8:22am View    
Hmm, i think i have an idea but here is my result declaration.


<pre lang="vb"> Dim result = From s In reader.GetSales() _
Join c In reader.GetSalesRep() _
On s.SalesRepID Equals c.SalesRepID _
Order By c.SalesRepID _
Select New _
With { _
.SalesRepID = c.SalesRepID, _
.FirstName = c.FirstName, _
.LastName = c.LastName, _
.PhotoFile = c.PhotoFile, _
.Manufacturer = s.Manufacturer, _
.Model = s.Model, _
.Color = s.Color, _
.Year = s.Year, _
.DateSold = s.DateSold, _
.AcquisitionCost = s.AcquisitionCost, _
.MaintenanceCost = s.MaintenanceCost, _
.SellingPrice = s.SellingPrice, _
.AcquiredDate = s.AcquiredDate, _
.OdometerReading = s.OdometerReading, _
.StartDate = c.StartDate, _
.VehicleID = s.VehicleID _
}




Dim sb As New StringBuilder(50)
Dim path As String = "..\debug\CarSalesFiles\Commissions" + DateTime.Today.Year + DateTime.Today.Month + DateTime.Today.Day + ".txt"
If Not File.Exists(path) Then
Using sw As StreamWriter = File.CreateText(path)
For Each item As var In result</pre>
Techhi 4-Mar-12 2:55am View    
Hmm still very much confused friend.
Techhi 4-Mar-12 2:33am View    
I converted from C# to VB.NET. I don't have a clue on how to go about that.Can you explain to me further please?
Techhi 3-Mar-12 14:10pm View    
Thank You added Import.System and it got that error off but it gave me the :


'Set' parameter must have the same type as the containing property

error.

For this :

[code]
Public Property AcquiredDate As DateTime
Get
Return m_DateTime
End Get
Set(ByVal value)
m_DateTime = Value
End Set
End Property

[/code]
Techhi 3-Mar-12 14:10pm View    
Thank You added Import.System and it got that error off but it gave me the :


'Set' parameter must have the same type as the containing property error.

For this :

[code]
Public Property AcquiredDate As DateTime
Get
Return m_DateTime
End Get
Set(ByVal value)
m_DateTime = Value
End Set
End Property

[/code]