Click here to Skip to main content
See more: ASM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Text.RegularExpressions;
 
namespace TextFileEditing
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
 
        private void btnEdit_Click(object sender, EventArgs e)
        {
 
            string filename = @"D:\SANTHOSH\WRP_2.sql";
 
            string[] text = File.ReadAllLines(filename).Where(s => s.Trim() != string.Empty).ToArray();
 
            File.Delete(filename);
            File.WriteAllLines(filename, text);                 
        }
    }
}
Closed because this post is not a question, or has not been phrased in a way that allows a reasonable answer to be provided. Reported by __TR__, lewax00, Graham Breach, __TR__, Akinmade Bond on Thursday, January 3, 2013 6:33am.
Posted 3-Jan-13 4:48am
Edited 3-Jan-13 6:35am
(no name)19.6K
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Peter Leow 295
1 Mika Wendelius 240
2 CHill60 195
3 Zoltán Zörgő 188
4 TheRealSteveJudge 180
0 Sergey Alexandrovich Kryukov 8,698
1 OriginalGriff 6,591
2 Peter Leow 3,982
3 Zoltán Zörgő 3,634
4 Richard MacCutchan 2,535


Advertise | Privacy | Mobile
Web02 | 2.8.150123.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100