Computers/Language
2014. 6. 21. 20:51
[C#] TextBox 를 배열로 제어
private void ParseTextIUPR_X(string TB) // 2014.06.21
{
string tempText;
int TextboxNo;
if (!TB.StartsWith("IUPR")) return;
TextBox[] arrTextbox = new TextBox[] { tbIUPR01, tbIUPR02, tbIUPR03, tbIUPR04, tbIUPR05, tbIUPR06, tbIUPR07, tbIUPR08 };
// get only digital portion
tempText = TB.Substring(4, 2);
TextboxNo = Convert.ToInt16 (tempText);
arrTextbox[TextboxNo].Text = TB.Substring(7, TB.Length-7);
}
구글 검색