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()
        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.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 5:33am.
Posted 3-Jan-13 3:48am
Edited 3-Jan-13 5:35am

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

  Print Answers RSS
0 OriginalGriff 7,280
1 Sergey Alexandrovich Kryukov 6,059
2 Maciej Los 3,579
3 Peter Leow 3,383
4 CHill60 2,522

Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2014
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