Solved

Easy conversion from vb.net to c#

Posted on 2008-06-10
2
171 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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