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

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

  Print Answers RSS
0 OriginalGriff 489
1 ChintanShukla 295
2 RyanDev 250
3 Richard Deeming 250
4 Sergey Alexandrovich Kryukov 218
0 Sergey Alexandrovich Kryukov 8,906
1 OriginalGriff 7,601
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,923


Advertise | Privacy | Mobile
Web03 | 2.8.140827.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