Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net convert some C# code

Hi. The first code sample is my VB.net.  I am trying to add the ".Tracking" part which is shown in C#
in the second code set below from "Tracking = new ItemTracking"
How would that look in my VB.net code?

            Dim LineItems As New List(Of LineItem)
            Dim pLineItem As New LineItem
            With pLineItem
                .Description = "Services Rendered"
                .Quantity = 1
                .UnitAmount = "1234.56"
                .AccountCode = "4000"
                .Tracking = ????
            End With

Open in new window


                        new LineItem
                        {
                            AccountCode = "200",
                            Description = "3 copies of OS X 10.6 Snow Leopard",
                            UnitAmount = 59.00m,
                            Quantity = 3m,
                            TaxAmount = 19.97m,
                            TaxType = "OUTPUT2",
                            LineAmount = 177.00m,
                            Tracking = new ItemTracking
                            {
                                new ItemTrackingCategory
                                {
                                    Id = category,
                                    Name = name,
                                    Option = option
                                }
                            }
                        },

Open in new window

SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thank you very much