سورنا_سردار
دوشنبه 04 اردیبهشت 1396, 01:52 صبح
چطور میشه خطوط تکست باکس رو مدیریت کرد؟؟
مثلا میخوام فقط خط دوم رو بخونم
یا یک مقدار یک عددی رو فقط تو خط سوم تکست باکسم نمایش بدم؟
mmbguide
دوشنبه 04 اردیبهشت 1396, 13:41 عصر
MSDN
// Create a string array and store the contents of the Lines property.
string[] tempArray = textBox1.Lines;
// Loop through the array and send the contents of the array to debug window.
for(int counter=0; counter < tempArray.Length;counter++)
{
System.Diagnostics.Debug.WriteLine(tempArray[counter]);
}
میتونید مستقیما هم خط مورد نظر را رو بخونید:
this.textBox1.Lines[2];
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.