Array Or ArrayList Or Structure In An Array?

Nov 9, 2010

After gathering the Machine names on the (sealed) LAn i am then getting the ip addresses, MAc address and Macine User name of each machine on the LAn..These details will need to be accessed seperately for use in the security testing and i am unsure how best to store the active data (though eventually in a database) Am i best to create a Multidimensinal arrayList or array(bearing in mind that all the data is convereted to "String" (arrays can only store one data type??) The data found on the live network is allways changing making an array a difficult choice? I have read some tutorials mentioning making a structure with the data and storing this in an arraylist but i dont know whether this will make accessing the individual data items (ip,MAc,HostName etc) a difficult procedure?

View 1 Replies


ADVERTISEMENT

Arraylist Of Structure Within Array Of Structure?

May 23, 2010

I want to make a structure within a structure. Basically it will appear like this:

Structure ID
dim CardType as string
im CardCode as string

[code]......

View 13 Replies

Create An Array Of An Array (or Arraylist Of An Arraylist) To Hold Strings?

Mar 20, 2012

I want to create an array of an array (or arraylist of an arraylist) to hold strings.I want to fill an array1 with string values Then add this array to array2. - but only taking up 1 row in array2 e.g something like array2(index)=array1 Then clear array1 then loop through this again with different data, and add it to the array2.so will end up with something like

array2(0)... contains a collection of array1 data
array2(1)... contains a collection of different array1 data
.. and so on

i think i need to make new instances of array1 each loop, but not sure.I dont mind if it uses arrays, or arraylists, or lists, or structure of arrayslists?

View 6 Replies

Array.Sort Returns Blank Data When Sorting A Structure Array?

Jun 19, 2009

I'm trying to sort an array based on a structure but whenever I do this, it basically erases all the data in the entire array.I have verified that the array is populated correctly, it is when using array.sort that everything returns blank.

View 6 Replies

Passing A Structure Containing An Array Of String And An Array Of Integer Into A C++ DLL?

May 27, 2010

I'm having problems with marshaling in VB.NET to C++, here's the code :

In the C++ DLL :
struct APP_PARAM
{

[code].....

View 2 Replies

Four Columns Of Data In A 2d Array Or Structure Array?

Dec 2, 2009

Here's the data I'm trying to work with

Spark Plugs
column 1: PR214,PR223,PR224,PR246,PR247,PR248,PR324,PR326,PR444
Brands:
column 2: MR43T,R43,R43N,R46N,R46TS,R46TX,S46,SR46E,47L
column 3: RBL8,RJ6,RN4,RN8,RBL17Y,RBL12-6,J11,XEJ8,H12
column 4L 14K22,14K24,14K30,14K32,14K33,14K35,14K38,14K40,14K44

Here is what i came up with for my code so far

Public Class frmMain
Private strSpark() As String = {"PR214","PR223","PR224","PR246","PR247","PR248","PR324", "PR326","PR444"}
Private strBrands As String(,) = { { } }
End Class

View 4 Replies

Converting Structure Within Structure To Byte Array For Socket

Aug 29, 2009

I am trying to communicate with an external device and i am trying to send a byte array to the external device via sockets but i am always getting a response the message size is too small so i am not sure what i have done wrong. Between the data type there should be no alignment present and all numbers are represented in little endian format. The char array is not null terminated as mentioned in the protocol specifications.

I have to send data based on a struct that embeds 2 other struct. So here's my vb.net code for the struct used to convert to byte array and the sending part.

Public Structure MESSAGETYPE_OIP_Login
Dim Header() As COMMANDHEADER
Dim UserName() As PSTRING

[Code]....

View 2 Replies

For Each Array In ArrayList?

Jun 7, 2011

Dim iArr As Array For Each iArr In m_alTabell 'ReDim myArr(16, 11) If i dim iArr(0,0) as string I could do this.ii = ii + 1 iArr(i, constanter.colNames.colValue) =m_objList.GroupItems.Item(ii).ListItems(i).Value'm_alTabell.RemoveAt(ii - 1)'m_alTabell.Add(iArr)

[Code]...

I have a problem with this code. m_alTabell constists of 10 twodimensional arrays. I have some data in them from the beginning. Now I want to add data in each iArr in a_alTabell. This works fine on the first one. But then the trouble starts. It just keeps overwriting the first iArr in m_alTabell. So if i could redim iArr it would solve the problem but i cant do that course it needs to be declared as Array and not "Dim iArr(0,0) as string" since that couses other problems.

View 11 Replies

Put Into An Array Or Arraylist?

Jun 18, 2012

Here's my code

Dim allelementds As HtmlElementCollection = MbFacebookBrowser.Document.GetElementsByTagName("span")
For Each DD As HtmlElement In allelementds
If DD.OuterHtml.Contains("resource") Then
TlsResourceComboBox.Items.Add(DD.GetAttribute("InnerText"))

[code]....

As you can see im currently using a combobox as a type of a list which uses index to give certain labels their text I know that there are only 4 indexes when getting the inner text so how can put those 4 indexes into a sort of list without me using a Combobox?

View 3 Replies

Assign Array Of Structure To Another Of Same Structure?

Oct 12, 2010

In Vb.net I am trying to assign an array of structure to another array of same structure[code]...

View 2 Replies

ArrayList Vs Array Of Strings?

Mar 7, 2009

If I want to store a list of names ie. "David", "Frank", "Chris", would it be better to do:

[Code]...

Also, what is the difference if you put the () with the variable name or with the type? I see sometimes

[Code]...

View 6 Replies

Struct - .net 2003 Arraylist Of Structure Which Have An Arraylist?

Sep 22, 2011

I have two structures Public Structure myResearchData

Public batchName As String
Public arraylistRData As ArrayList
End Structure
Public Structure myResearchSubData
Public researchDescription As String

[Code]...

Cleared MyResearchData.arraylistRData for new data to be put in but it also clears the arraylist inside MyResearchDataAList and didn't old the contents of the arraylist

View 1 Replies

Convert Array To ArrayList In Program?

Feb 27, 2012

I have an array of String and I have to convert it to an ArrayList. Is it possible to do it in VB.Net?

View 1 Replies

ArrayList Versus Structures - 'array Of Records'

Jun 23, 2009

Is an ArrayList the same thing as a Structure (i.e. 'array of records')? If they're not the same think, what't the difference?

View 3 Replies

Asp.net - Take .net Server Side Arraylist And Convert To Javascript Array?

Feb 9, 2011

I have an array list on my server side that i want to use on my client side as an array how can i do this.

View 1 Replies

VS 2010 : Copy This Array To A Temp Array So That The Temp Array Has All The Same Values As The Original Custom Array?

Jun 19, 2011

I have an array of people stored in a custom structure array... how can i copy this array to a temp array so that the temp array has all the same values as the original custom array?

View 4 Replies

.net - Array Defaulting To 'nothing' Rather Than '0' In Structure?

Mar 29, 2012

I'm currently stuck on an issue regarding declaring an array of type short in a structure and having it default to 'nothing' rather than '0' after ReDim.'Declaring array and setting it's initial size

Private Structure Totals_T
Dim sTot_Desc As String
<VBFixedArray(10)> Dim iTot_Cnt() As Short
Public Sub Initialize()
ReDim iTot_Cnt(10)
End Sub

[Code]...

When calling m_Totals(0) the arrays returned have 10 records in the arry with sTot_Desc and iTot_Cnt having values of nothing in all records. When I ReDim m_Totals both the variables I declared in the structure(sTot_Desc and iTot_Cnt) are declared as nothing, it's fine for the String but I need the Short I declared to be declared as '0', which is what I thought happens when you ReDim. Can anyone see what's going on here and why it's declaring my variables as 'nothing' rather than defaulting to '0' for the short and ""/nothing for the string?

View 1 Replies

Code An Array Of Structure?

Mar 26, 2009

I am once again struggling with my weekly project. I am assigned to write a program that converts a predetermined english sentence to both french and german. The code is to contain an Array and a structure. Also we have not covered retrieving array data from a TXT file, so we are to hard code in the array data. I coded the structure and the array, I added the array data, but am confused how to access the data. The examples I have found all deal with retrieving data from a TXT file. Can someone give me a nudge in the right direction.[code]....

View 3 Replies

Create An Array Of A Structure?

May 1, 2009

The more I read my book the more confused I get, as the programming example is not even close to what this assignment is I am to modify my existing project to keep track of an order in an array.

View 1 Replies

Multidimensional Array Within A Structure

Oct 23, 2009

I'm very new to VB.NET and I suppose this is a little big for a first project.I've done the same thing in other languages so I figured it wouldn't give me much trouble.I'm working on a map editor program for a 2D platformer game.The map will be an array of a structure which contains the width, height, and tile elements of each layer. the tile elements are stored in a 2D array within the structure.[code]That didn't give an exception but I'm not sure that it actually redimmed considering the second assignment command still crashed.

View 1 Replies

Sort An Array Structure?

Oct 25, 2011

I have the following array structure defined and am having trouble figuring out how to sort it..

Public svrElements() As svrElementRec
Structure svrElementRec
Public ElemName As String

[Code]....

View 8 Replies

Structure Containing An Array Element?

Jul 7, 2009

I am writing a class and room scheduling program, and would like to use an arraylist that will contain structures. The structure has a couple of arrays in it for when the class meets, and I am having difficulties figuring out the correct syntax to declare the array in the structure. Additionally, in the syntax to access the array. For instance, say I want the MeetingDays to be T, F, T, F, F, F, F; the Meeting Times to be "8:00AM", "", "8:00AM". "", "", "", "", ""; and the Duration to be 75, 0, 75, 0, 0, 0, 0

Public ClassList As ArrayList = New ArrayList
Public Structure MyStructure
Private _ClassName As String

[code].....

View 3 Replies

Using An Array Inside Of A Structure In VB?

May 17, 2012

I'm trying to create a structure and inside it put an array of "Genres". This is my structure declaration:

Structure BookData
Dim strGenres() As String

[code]....

But I keep getting an error with the .strGenres(5). VB is telling me "End of statement expected"

View 10 Replies

Using Indexof With Structure And Array

Mar 11, 2009

I'm having a bit of trouble trying to iterate or search through my array (or structure).I am reading in some values from a file, and populating my array.Then, I need to search to compare to one of the values in my array.[code]any pointers? should I use something else instead of arrays / structures ?

View 4 Replies

Using Copy Method To Split Data From ArrayList To A Jagged Array?

Jun 29, 2010

I am trying to split an array into a jagged array for easy manipulation, but I am having a bit of trouble with the Copy method of Array.This is what I have:

Dim masterData()() As String = New String(splitCounter.Count - 1)() {}
For i As Integer = splitCounter(0) To splitCounter.LastIndexOf(splitCounter)
Array.Copy(ServerResponse, splitCounter(i), masterData(i) = New String(), i, splitCounter(i

[code]....

View 2 Replies

VS 2010 : Counting Number Of Occurrences Of Element Within An Array Or Arraylist?

Mar 13, 2012

there are any nifty in-built .net methods that can essentially return either the number of occurrences of each element in an array, or simply return the modal value.

View 7 Replies

VS 2008 Storing Information To An Array Or ArrayList And Displaying Each Item In Label?

Apr 22, 2010

I have a list of names in a database and what i want is to get all of these names and display them in a label or a text box to the user on the website. I have tried to do this using a for loop but it is always overwriting the label each time. I have a list of 10 different names in the database and what it is doing is putting the first name in the label and then overwriting this with the second name and so on until it reaches the last name. I think i need to store each of the names from the database into an array or an arrayList and then make the label display all of the contents from the array or arrayList. The for loop i have used for this is:

Dim g As SQLadmin = New SQLadmin()
g.DB("SELECT nameOfPerson FROM Persons")
For i As Integer = 0 To g.array.GetLength(0) - 1

[code]....

i can select the names from the database and store them in an array then make the label display each of the names.

View 6 Replies

.net - Sum Similar Element Of An Array Of Structure?

Feb 11, 2012

I have an array of structures:

[Code]...

An array of the above structure with 30 element. I want to sum the empsal of those emp elements whose emp.empName & emp.empAge is equal.

[Code]...

View 2 Replies

Adding To An Established Array With A Structure

Feb 13, 2012

I am trying to be able to add to an established Array that is read in from a CSV file. I'm using structures and I get the concept, but I just can't seem to get it to store. I am using Visual Basic 2010. Sorry for posting in here, but I did not see a category for it.

[Code]...

View 3 Replies

Convert Structure To Byte Array In .NET?

Aug 17, 2009

I wish to write a structure made up of fixed length strings to a file using y.Computer.FileSystem.WriteAllBytes or the like.I am using a VB6 project with fixed length strings that I have converted in to VB.Net.

Structure Record
<VBFixedString(22),System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray,SizeConst:=22)> Public tim() As Char

[code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved