.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

StreamReader using ReadLine

Posted By:SanthoshNathan       Posted Date: November 08, 2010    Points: 15    Category: Visual Studio    URL: http://www.dotnetspark.com  

StreamReader using ReadLine

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StreamReader.ReadLine
    class Program
        static void Main(string[] args)
            FileStream fs2 = File.Create("santhosh.txt");

            StreamWriter w2 = new StreamWriter(fs2);
            w2.Write("Goodbye santhosh");

            fs2 = File.Open("santhosh.txt", FileMode.Open, FileAccess.Read, FileShare.None);
            StreamReader r2 = new StreamReader(fs2);
            String t;
            while ((t = r2.ReadLine()) != null)


Further Readings:


    No response found. Be the first to respond this post

    Post Comment

    You must Sign In To post reply
    Find More code samples in C#, ASP.Net, Vb.Net and more Here

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend