English 中文(简体)
VB.net Set x,y,z Value from text file into separate ranges
原标题:VB.net Set x,y,z values from text file into separate arrays

我一直在努力寻找几天来如何做到这一点,因此我最后要问如何。 我对方案拟订工作感到新鲜。 这就是我的问题。

我试图从一个文本档案中提取x,y,z坐标:

x,y,z
x,y,z
x,y,z
etc.

我需要能够将X栏推入一个阵列、一个阵列和一个阵列。 我学会了如何把它拖进一条路,如何分两条线,但我不知道如何在两条 com后分裂,将其分开。

问题回答

<代码>String. Split功能将按选定特性将案文分成一系列长处。

Dim values As String() = line.Split(","c)
Dim x As Integer = Integer.Parse(values(0))
Dim y As Integer = Integer.Parse(values(1))
Dim z As Integer = Integer.Parse(values(2))




相关问题
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?

热门标签