Scrolly
Scrolly
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
The dashes would cause some problems because it surpasses the character limit of 10 we set on the array right?
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
Okay cool, thank you
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
I am just really trying to understand the code, i apologize
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
Okay, thanks
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
Would this be correct to determine if it is a digit and throw it into the array?
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
else if ((char.IsDigit(character)))
{
ConvNumbersArr[i] = (char)character;
}
else if ((char.IsDigit(character)))
{
ConvNumbersArr[i] = (char)character;
}
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
@ACiDCA7 are you available for a question really quick?
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
I think I got the worst of it down, thanks to you
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
You have been greatly helpful 🙂
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
Thank you very much for your time
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
I did not know i++ could be there at the bottom like that
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
Okay thanks
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
would i need to change character to i
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
private void button1_Click(object sender, EventArgs e)
{
var AlphNumber = AlphNumberBox.Text;
var AlphNumbersArr = AlphNumber.ToCharArray(0,9);
char[] ConvNumbersArr = new char[10];

int i = 0;

foreach (var character in AlphNumbersArr; i++)
{
if (char.IsLetter(character))
{
if (character == 'A' || character == 'B' || character == 'C')
{
ConvNumbersArr[i] = '2';
}
if (character == 'D' || character == 'E' || character == 'F')
{
ConvNumbersArr[i] = '3';
}
if (character == 'G' || character == 'H' || character == 'I')
{
ConvNumbersArr[i] = '4';
}
if (character == 'J' || character == 'K' || character == 'L')
{
ConvNumbersArr[i] = '5';
}
if (character == 'M' || character == 'N' || character == 'O')
{
ConvNumbersArr[i] = '6';
}
if (character == 'P' || character == 'Q' || character == 'R' || character == 'S')
{
ConvNumbersArr[i] = '7';
}
if (character == 'T' || character == 'U' || character == 'V')
{
ConvNumbersArr[i] = '8';
}
if (character == 'W' || character == 'X' || character == 'Y' || character == 'Z')
{
ConvNumbersArr[i] = '9';
}


}
}
}
private void button1_Click(object sender, EventArgs e)
{
var AlphNumber = AlphNumberBox.Text;
var AlphNumbersArr = AlphNumber.ToCharArray(0,9);
char[] ConvNumbersArr = new char[10];

int i = 0;

foreach (var character in AlphNumbersArr; i++)
{
if (char.IsLetter(character))
{
if (character == 'A' || character == 'B' || character == 'C')
{
ConvNumbersArr[i] = '2';
}
if (character == 'D' || character == 'E' || character == 'F')
{
ConvNumbersArr[i] = '3';
}
if (character == 'G' || character == 'H' || character == 'I')
{
ConvNumbersArr[i] = '4';
}
if (character == 'J' || character == 'K' || character == 'L')
{
ConvNumbersArr[i] = '5';
}
if (character == 'M' || character == 'N' || character == 'O')
{
ConvNumbersArr[i] = '6';
}
if (character == 'P' || character == 'Q' || character == 'R' || character == 'S')
{
ConvNumbersArr[i] = '7';
}
if (character == 'T' || character == 'U' || character == 'V')
{
ConvNumbersArr[i] = '8';
}
if (character == 'W' || character == 'X' || character == 'Y' || character == 'Z')
{
ConvNumbersArr[i] = '9';
}


}
}
}
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
int i = 0;
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
like this?
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
foreach (var character in AlphNumbersArr; i++)
{
if (char.IsLetter(character))
{
if (character == 'A' || character == 'B' || character == 'C')
{
ConvNumbersArr[i] = '2';
}
if (character == 'D' || character == 'E' || character == 'F')
{
ConvNumbersArr[i] = '3';
}
if (character == 'G' || character == 'H' || character == 'I')
{
ConvNumbersArr[i] = '4';
}
if (character == 'J' || character == 'K' || character == 'L')
{
ConvNumbersArr[i] = '5';
}
if (character == 'M' || character == 'N' || character == 'O')
{
ConvNumbersArr[i] = '6';
}
if (character == 'P' || character == 'Q' || character == 'R' || character == 'S')
{
ConvNumbersArr[i] = '7';
}
if (character == 'T' || character == 'U' || character == 'V')
{
ConvNumbersArr[i] = '8';
}
if (character == 'W' || character == 'X' || character == 'Y' || character == 'Z')
{
ConvNumbersArr[i] = '9';
}


}
}
}
foreach (var character in AlphNumbersArr; i++)
{
if (char.IsLetter(character))
{
if (character == 'A' || character == 'B' || character == 'C')
{
ConvNumbersArr[i] = '2';
}
if (character == 'D' || character == 'E' || character == 'F')
{
ConvNumbersArr[i] = '3';
}
if (character == 'G' || character == 'H' || character == 'I')
{
ConvNumbersArr[i] = '4';
}
if (character == 'J' || character == 'K' || character == 'L')
{
ConvNumbersArr[i] = '5';
}
if (character == 'M' || character == 'N' || character == 'O')
{
ConvNumbersArr[i] = '6';
}
if (character == 'P' || character == 'Q' || character == 'R' || character == 'S')
{
ConvNumbersArr[i] = '7';
}
if (character == 'T' || character == 'U' || character == 'V')
{
ConvNumbersArr[i] = '8';
}
if (character == 'W' || character == 'X' || character == 'Y' || character == 'Z')
{
ConvNumbersArr[i] = '9';
}


}
}
}
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
oh haha sorry
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
Hows that look
136 replies
CC#
Created by Scrolly on 4/8/2024 in #help
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
foreach (var character in AlphNumbersArr)
{
if (char.IsLetter(character))
{
for (int i = 0; i < AlphNumbersArr.Length; i++)
{
if (character == 'A' || character == 'B' || character == 'C')
{
ConvNumbersArr[i] = '2';
}
if (character == 'D' || character == 'E' || character == 'F')
{
ConvNumbersArr[i] = '3';
}
if (character == 'G' || character == 'H' || character == 'I')
{
ConvNumbersArr[i] = '4';
}
if (character == 'J' || character == 'K' || character == 'L')
{
ConvNumbersArr[i] = '5';
}
if (character == 'M' || character == 'N' || character == 'O')
{
ConvNumbersArr[i] = '6';
}
if (character == 'P' || character == 'Q' || character == 'R' || character == 'S')
{
ConvNumbersArr[i] = '7';
}
if (character == 'T' || character == 'U' || character == 'V')
{
ConvNumbersArr[i] = '8';
}
if (character == 'W' || character == 'X' || character == 'Y' || character == 'Z')
{
ConvNumbersArr[i] = '9';
}


}
}
}
foreach (var character in AlphNumbersArr)
{
if (char.IsLetter(character))
{
for (int i = 0; i < AlphNumbersArr.Length; i++)
{
if (character == 'A' || character == 'B' || character == 'C')
{
ConvNumbersArr[i] = '2';
}
if (character == 'D' || character == 'E' || character == 'F')
{
ConvNumbersArr[i] = '3';
}
if (character == 'G' || character == 'H' || character == 'I')
{
ConvNumbersArr[i] = '4';
}
if (character == 'J' || character == 'K' || character == 'L')
{
ConvNumbersArr[i] = '5';
}
if (character == 'M' || character == 'N' || character == 'O')
{
ConvNumbersArr[i] = '6';
}
if (character == 'P' || character == 'Q' || character == 'R' || character == 'S')
{
ConvNumbersArr[i] = '7';
}
if (character == 'T' || character == 'U' || character == 'V')
{
ConvNumbersArr[i] = '8';
}
if (character == 'W' || character == 'X' || character == 'Y' || character == 'Z')
{
ConvNumbersArr[i] = '9';
}


}
}
}
136 replies