English 中文(简体)
阅读简单的文字文件,分立,用vb对内容进行分类
原标题:reading a simple text file, splitting and sorting the contents using vb
  • 时间:2011-10-27 12:08:57
  •  标签:
  • vb.net

我在冒犯和做简单基础方面说得很新,我设法通过行文进入并阅读了具体档案线。 如果我想用 com子或空间分门别类,然后按字母或数字进行分类,那么我将如何采用这一程序? 我是否在阅读圈子内制造一个 lo,以平息信息? 树立榜样将真正有助于...... 感谢!

Dim file As String = "C:Users	est.txt"
    Dim Line As String

If System.IO.File.Exists(file) = True Then
        Dim objReader As New System.IO.StreamReader(file)
        Do While objReader.Peek() <> -1
            Line = Line & objReader.ReadLine() & vbNewLine
Loop
Next
Label1.Text = Line

 objReader.Close()
 Else
 MsgBox("File Does Not Exist")

    End If
最佳回答

这取决于你想要与你真正分开的案文做些什么。

斯皮利特(Split)(职能)将恢复你的一系列工作成果,而实际取决于数据。

http://www.dotnetperls.com

既然你提到过,你不妨对数据进行分类,请查看。 或研究如何使用准则。

It is quite acceptable to nest a loop within your main loop if you want to do something more complex with the data.

问题回答

暂无回答




相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签