Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
int j = i++ + ++i;
* This source code was highlighted with Source Code Highlighter.
- for (int i=0; i<this.textbox1.text.length; i++)
- {
- if (char.IsDigit(this.textbox1.text[i])==false)
- // give any error
- }
* This source code was highlighted with Source Code Highlighter.
- public bool TestIndusCode()
- {
- bool result = true;
- foreach (String str in _generatedDigits)
- {
- for (int i = 0; i < str.Length; i++)
- if (char.IsDigit(str[i]) == false)
- {
- result = false;
- break; //(sic!)
- }
- }
- return (result);
- }
* This source code was highlighted with Source Code Highlighter.foreach (String str in _generatedDigits)
{
for (int i = 0; i < str.Length; i++)
if (char.IsDigit(str[i]))
{
result = false;
}
else
{
return true;//незачем дальше перебирать буковки
}
}
Разбор полёта C# perfomance