تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] لو سمحت ممكن مساعدة في عرض سطرين من ملف تكست
#2
لديك الحل بالسورس مع القليل من التركيز
تفضل 
كود :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;


namespace WindowsFormsApplication2
{
  public partial class Form1 : Form
  {
      public Form1()
      {
          InitializeComponent();
      }

      private void Button1_Click(object sender, EventArgs e)
      {
          openFileDialog1.ShowDialog();
          string text = System.IO.File.ReadAllText(openFileDialog1.FileName);

          string line = File.ReadLines(openFileDialog1.FileName).Skip(3).FirstOrDefault() + Environment.NewLine + File.ReadLines(openFileDialog1.FileName).Skip(5).FirstOrDefault();


          TextBox1.Text = line;




      }
  }
}
الرد }}}
تم الشكر بواسطة: ابراهيم ايبو


الردود في هذا الموضوع
RE: لو سمحت ممكن مساعدة في عرض سطرين من ملف تكست - بواسطة medadam - 23-03-20, 01:03 AM


التنقل السريع :


يقوم بقرائة الموضوع: