Solved

Easy conversion from vb.net to c#

Posted on 2008-06-10
2
172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: 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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

759 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