Solved

Easy conversion from vb.net to c#

Posted on 2008-06-10
2
167 Views
Last Modified: 2013-12-17
I converted the
private void Update_Price_List_Header_with_Discounts(double[,] discounts)
        {
            double whtToughDiscount;
            double whtDampDiscount;
            double whtStoneDiscount;
            double durToughDiscount;
            double durDampDiscount;
            double durStoneDiscount;
            double blyToughDiscount;
            double blyDampDiscount;
            double blyStoneDiscount;
            double desToughDiscount;
            double desDampDiscount;

            whtToughDiscount = discounts[0, 0];
            whtDampDiscount = discounts[0, 1];
            whtStoneDiscount = discounts[0, 2];
            durToughDiscount = discounts[1, 0];
            durDampDiscount = discounts[1, 1];
            durStoneDiscount = discounts[1, 2];
            blyToughDiscount = discounts[2, 0];
            blyDampDiscount = discounts[2, 1];
            blyStoneDiscount = discounts[2, 2];
            desToughDiscount = discounts[3, 0];
            desDampDiscount = discounts[3, 1];

            // Store the values in the Price List Header table
        }

from

Private Sub Insert_Price_List_Detail(ByVal gradeName As String, ByVal Price As Double)
        ' Store the values into the Price List Details table
    End Sub

    Private Sub Update_Price_List_Header_with_Discounts(ByVal discounts(,) As Double)
        Dim whtToughDiscount, whtDampDiscount, whtStoneDiscount As Double
        Dim durToughDiscount, durDampDiscount, durStoneDiscount As Double
        Dim blyToughDiscount, blyDampDiscount, blyStoneDiscount As Double
        Dim desToughDiscount, desDampDiscount As Double

        whtToughDiscount = discounts(0, 0)
        whtDampDiscount = discounts(0, 1)
        whtStoneDiscount = discounts(0, 2)
        durToughDiscount = discounts(1, 0)
        durDampDiscount = discounts(1, 1)
        durStoneDiscount = discounts(1, 2)
        blyToughDiscount = discounts(2, 0)
        blyDampDiscount = discounts(2, 1)
        blyStoneDiscount = discounts(2, 2)
        desToughDiscount = discounts(3, 0)
        desDampDiscount = discounts(3, 1)

        ' Store the values in the Price List Header table
    End Sub

Is this ok.
0
Comment
Question by:mathieu_cupryk
2 Comments
 
LVL 23

Accepted Solution

by:
debuggerau earned 500 total points
ID: 21756158
whats this comma for?
(ByVal discounts(,) As Double)

And why in brackets?

There is not conversion for this one either:

Private Sub Insert_Price_List_Detail(ByVal gradeName As String, ByVal Price As Double)
        ' Store the values into the Price List Details table
End Sub

Otherwise, yes..
0
 

Author Comment

by:mathieu_cupryk
ID: 21756162
what should this be in c#
whats this comma for?
(ByVal discounts(,) As Double)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now