C#读取并显示大量数据 [英] C # read and display large amount of data

查看:376
本文介绍了C#读取并显示大量数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在海量数据中使用C#读取文本文件(例如,第4行数据[x,y,z,t],但有1000万行,或更多行数据),那么这些数据根据x,y,z等数据动态地显示为表格形式的数据,但是显示所需的数据以观察动态显示.例如能够对这些三维数据实现动态观察.是否有任何好的方法或有效的算法来读取和显示数据.谢谢.

I want to read a text file using C # in the mass data (for example, line 4 data [x, y, z, t], but there are 10 million lines, or more rows of data), then these data according to x, y , z and other data to display the data dynamically to the form, but display the data required to observe the dynamic display.Such as the ability to achieve the dynamic observation of these three-dimensional data. Is there any good methods or efficient algorithms to read and display data. Thank you.

推荐答案

问候;

我从问题标记中看到您正在使用C#3.0/C#3.5.如果要使用Microsoft .NET 4.0框架为Microsoft Windows平台开发应用程序,是否考虑过使用 System.IO.MemoryMappedFiles 命名空间中的 MemoryMappedFile 类? http://msdn.microsoft.com/en-us/library/system.io.memorymappedfiles.memorymappedfile.aspx

在上面引用的URL中的"MSDN备注"部分中:

一个内存映射文件将文件的内容映射到应用程序的逻辑地址空间.内存映射文件使程序员可以处理非常大的文件,因为可以同时管理内存,并且它们允许完全随机地访问文件而无需查找.内存映射文件也可以在多个进程之间共享.

我希望这对您有帮助并引起关注……
Greetings;

I see from the question tages you’re using C# 3.0 / C# 3.5. If you’re developing your application for the Microsoft Windows platform using the Microsoft .NET 4.0 Framework, have you considered using the MemoryMappedFile class in the System.IO.MemoryMappedFiles namespace? http://msdn.microsoft.com/en-us/library/system.io.memorymappedfiles.memorymappedfile.aspx

From the MSDN Remarks section in the URL referenced above:

A memory-mapped file maps the contents of a file to an application’s logical address space. Memory-mapped files enable programmers to work with extremely large files because memory can be managed concurrently, and they allow complete, random access to a file without the need for seeking. Memory-mapped files can also be shared across multiple processes.

I hope this was of help and of interest…


首先将大文件分成较小的文件,然后逐个处理它们

Tanvtech
First divide the big file into smaller and process them one by one

Tanvtech


这篇关于C#读取并显示大量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆