I Have a dilemma: How to set a array so I can access from other functions inside the application (I've seen it done in Console Application, but I'm using Windows Application Templet)..., This is what I want:
public string[,] digit = new string[10, 3];
public string[] portion = new string[6];
portion[0] = " cents";
portion[1] = " dollar";
portion[2] = " dollars";
portion[3] = " Hundred";
portion[4] = " Thousand";
portion[5] = " Million";
digit[0, 0] = null;
digit[0, 1] = null;
digit[0, 2] = null;
digit[1, 0] = "One";
digit[1, 1] = "Eleven";
digit[1, 2] = "Ten";
digit[2, 0] = "Two";
digit[2, 1] = "Twelve";
digit[2, 2] = "Twenty";
digit[3, 0] = "Tree";
digit[3, 1] = "Thirteen";
digit[3, 2] = "Thirty";
digit[4, 0] = "Four";
digit[4, 1] = "Fourteen";
digit[4, 2] = "Forty";
digit[5, 0] = "Five";
digit[5, 1] = "Fifteen";
digit[5, 2] = "Fifty";
digit[6, 0] = "Six";
digit[6, 1] = "Sixteen";
digit[6, 2] = "Sixty";
digit[7, 0] = "Seven";
digit[7, 1] = "Seventeen";
digit[7, 2] = "Seventy";
digit[8, 0] = "Eight";
digit[8, 1] = "Eighteen";
digit[8, 2] = "Eighty";
digit[9, 0] = "Nine";
digit[9, 1] = "Nineteen";
digit[9, 2] = "Ninety";
then from my functions do something like
private string DgtStr(int x, int z)
{
return digit[x, z];
}
but digt and portion has to be a public (global) array accessible form anywhere...