Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have written code below i want to convert it to c# . can anyone help me out

What I have tried:

VB.NET
Dim query = From order In Temp_Data.AsEnumerable().Where(Function(x) x.Field(Of String)("VesselType") = param_vesseltype And x.Field(Of String)("VoyageType") = param_voyagetype)
                                Group order By VesselID = order.Field(Of String)("VesselID"), VesselName = order.Field(Of String)("VesselName") Into g = Group
                                Select New With {
                                     .VesselName = VesselName,
                                    .VesselId = VesselID,
                                    .tot_ifo = g.Sum(Function(order) order.Field(Of Double)("Tot_Ifo")),
                                    .tot_ifols = g.Sum(Function(order) order.Field(Of Double)("Tot_Ifols")),
                                    .tot_mdols = g.Sum(Function(order) order.Field(Of Double)("Tot_mdols")),
                                    .tot_mdo = g.Sum(Function(order) order.Field(Of Double)("Tot_mdo")),
                                    .Co2 = g.Sum(Function(order) order.Field(Of Double)("Co2")),
                                    .Nox = g.Sum(Function(order) order.Field(Of Double)("Nox")),
                                    .Sox = g.Sum(Function(order) order.Field(Of Double)("Sox"))
                                    }
Posted
Updated 16-Apr-16 11:31am
v2
Comments
Sinisa Hajnal 13-Apr-16 2:40am    
There are online converters from vb.net to c#. What is the problem?

TRY ILSpy_Master_2.3.1.1855_Binaries
ILSpy[^]
Can do convert
 
Share this answer
 
There's tons of converters[^]! Have you tried any of them?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900