Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Easy conversion from vb.net to c#

Posted on 2008-06-10
2
Medium Priority
?
175 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 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

688 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