# Need some help...

I'm a C# noob...Any help would be appreciated:

// used only to populate the combo box, but you could use for determining
// angle to pass to the load factor function
private int[] mintAngleOfBank = {0, 10, 30, 45, 60, 70, 80, 85, 90};

private decimal[] mdecLoadFactor = {1.0M, 1.015M, 1.154M, 1.414M, 2, 2.923M, 5.747M, 11.473M, 9999};

object sender, System.EventArgs e)
{
this.cboAngle.DataSource = mintAngleOfBank;
}

private void btnCalculate_Click(
object sender, System.EventArgs e)
{
// delcare variable
int intWeight = 0;
decimal decWeightImposed = 0;

}

{
}

How can I get the values in mintAngleOfBank = {0, 10, 30, 45, 60, 70, 80, 85, 90};
to relate to private decimal[] mdecLoadFactor = {1.0M, 1.015M, 1.154M, 1.414M, 2, 2.923M, 5.747M, 11.473M, 9999};

In the combobox, if I hit 0, 1.0 should display in a label and so forth.....

Any suggestions?

Thx

• : I'm a C# noob...Any help would be appreciated:
:
: // used only to populate the combo box, but you could use for determining
: // angle to pass to the load factor function
: private int[] mintAngleOfBank = {0, 10, 30, 45, 60, 70, 80, 85, 90};
:
: private decimal[] mdecLoadFactor = {1.0M, 1.015M, 1.154M, 1.414M, 2, 2.923M, 5.747M, 11.473M, 9999};
:
: object sender, System.EventArgs e)
: {
: this.cboAngle.DataSource = mintAngleOfBank;
: }
:
:
: private void btnCalculate_Click(
: object sender, System.EventArgs e)
: {
: // delcare variable
: int intWeight = 0;
: decimal decWeightImposed = 0;
:
:
:
:
: }
:
: {
: }
:
:
:
: How can I get the values in mintAngleOfBank = {0, 10, 30, 45, 60, 70, 80, 85, 90};
: to relate to private decimal[] mdecLoadFactor = {1.0M, 1.015M, 1.154M, 1.414M, 2, 2.923M, 5.747M, 11.473M, 9999};
:
: In the combobox, if I hit 0, 1.0 should display in a label and so forth.....
:
: Any suggestions?
:
: Thx
:

All you need to do is to look for SelectedIndexChanged in the Events part of the combobox [ cboAngle] properties, create a label.

Then copy everything down as shown below.

void cboAngleSelectedIndexChanged(object sender, System.EventArgs e)
{

this.label1.Text = "LoadFactor :- " +
}

void btnCalculateClick(object sender, System.EventArgs e)
{
// declare variables
int intWeight = 0;
decimal decWeightImposed = 0;

{