public class Talaba
{
public string ismi ;
public int yoshi ;
}
Talaba a = new Talaba(); 8. Sinf obyektini hosil qilishda qanday funksiya chaqiriladi
22-topshiriq
using System;
using System.IO;
using System.Collections;
namespace ConsoleApp8 {
class Program {
static void Main(string[] args) {
ArrayList w = new ArrayList();
String a = "";
StreamReader sr = File.OpenText(@"d:\a.txt");
while ((a=sr.ReadLine())!=null) {
w.Add(a);
}
foreach (var item in w) {
if (w[50]==item) {
break;
}
Console.WriteLine(item);
}
}
}
}
Do'stlaringiz bilan baham: |