数据处理 [英] Data Handling

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

问题描述

我想构建一个诸如交易终端的应用程序,其中平面文件中的50万条记录将在4-5秒内加载到内存或某种结构中.我已经在delphi中看到了.我不知道该怎么实现.
每个记录都有6-7个字段,每个字段都是整数.

i want to build an application such as trading termminal, where 50 lakh of record from flat file get loaded in memory or some structure in just 4-5 second.i have seen that in delphi. I don''t know how to achieve this.
Each record has 6-7 field and each filed are integer.

推荐答案

我不确定您正在使用或尝试实现什么.

IO非常快.在眨眼之前,我可以从多个文件中加载500,000行.为了在vb.net中使用IO,您应该将其导入到您正在处理的项目中.这是该领域的一些技巧.

在类形式的顶部和边界之外.

导入System.io

为了使用system.io,我们需要获取文件.

I am not sure what you are working with, or trying to achieve.

The IO is very fast. I can load 500,000 lines from multiple files before you can blink. In order to use IO in vb.net you should import it into the project you are working on. Here are some tips in that area.

at the top, and outside of the bounds of class form.

Imports System.io

In order to use the system.io we need to get files.

       Dim d As DirectoryInfo = New DirectoryInfo(Application.StartupPath & "\Files")<br />
        Dim f As FileInfo<br />
<br />
        For Each f In d.GetFiles<br />
<br />
		Dim StreamReader As StreamReader = New StreamReader(F.FullName)<br />
<br />
            Do Until StreamReader.EndOfStream<br />
<br />
                Dim Str As String = StreamReader.ReadLine ‘ do something here<br />
<br />
            Loop<br />
<br />
            StreamReader.Close()<br />
<br />
        Next


这篇关于数据处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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