Solved

Easy conversion from vb.net to c#

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

636 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