Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

MrWeiland

@MrWeiland
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Read large text files with c#
    M MrWeiland

    You are so right, little mistake from my side :-O

    C# csharp performance help tutorial

  • Read large text files with c#
    M MrWeiland

    I dont quite get what you are saying here.. In this case it would be possible to read chunks from whereever you like in file...or did i dont understand what you saying? FileStream fs=new FileStream(fileName, FileMode.Open, FileAccess.ReadWrite, FileShare.None, 8192 ); //we use the default buffer StringBuilder result=new StringBuilder(8192); byte[] buffer=new byte[8192]; int count=fs.Read(buffer,0,8192); //reading a block from the file, here we could start for example on 2000 instead of pos 0 //(fs.Read(buffer,2000,8192)) ASCIIEncoding encoding=new ASCIIEncoding(); while (count!=0) //stop when Read returns 0 { result.Append(encoding.GetString(buffer)); count=fs.Read(buffer,0,8192); } fs.Seek(0, SeekOrigin.Begin);

    C# csharp performance help tutorial

  • Read large text files with c#
    M MrWeiland

    How do you mean you should do then?

    C# csharp performance help tutorial

  • Read large text files with c#
    M MrWeiland

    Sent you a mail :)

    C# csharp performance help tutorial

  • Read large text files with c#
    M MrWeiland

    I know that i cannot read lets say 80mb big file into a textbox, first i takes too long and second it would take alot of memory. I need to find a approach to read sections from file to textbox and when user scrolls down or push page down it read another section... Is that a good approach to problem or do anyone have another approach to read large textfiles fast... <Im really impressed what Christan Ghisler done with his lister, its really fast.>) Im open for ideas how to solve this problem... -- modified at 12:13 Tuesday 7th March, 2006

    C# csharp performance help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups