473,769 Members | 5,878 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ArrayList Help

While writing this plea for help, I think I solved my
dilemma, but I don't know why the problem solving
statement is necessary. The inspiration for the
statement came from an undocumented VB example I found on
the web. I would be most appreciative if someone could
explain why this statement is necessary and what does it
do:

MyArt = New Art

Early in the code, ArtList, MyArt & AddNew had been
declared with the following statements:

Public ArtList as New ArrayList
Public MyArt as New Art
Public AddNew as Boolean

I am creating a Windows application which uses an
ArrayList to contain a small amount of data. ArtList, is
an instance of an ArrayList that will contain multiple
(up to 200) Art objects. MyArt is an instance of the Art
object. In the application I want to add, delete and
edit the individual Art objects in ArtList. I am
serializing and deserializing the ArrayList and using a
FileStream to read and write to the hard drive. This is
the code in question, and the mystery statement is
commented with ******

Private Sub btnNew_Click(By Val sender As System.Object, _
ByVal e As System.EventArg s) Handles btnNew.Click

ClearForm() 'A sub to clear the Form's textboxes
AddNew = True
End Sub

Private Sub btnAdd_Click(By Val sender As System.Object, _
ByVal e As System.EventArg s) Handles btnAdd.Click

Dim Msg1 As String = "Do you want to ADD this new
Object?"
Dim Msg2 As String = "Update Art"
Dim Ans As MsgBoxResult
If FormChanged() And AddNew Then
Ans = MsgBox(Msg1, MsgBoxStyle.Yes No, Msg2)
If Ans = MsgBoxResult.Ye s Then
MyArt = New Art '??? ********* ???
Form2MyArt() 'Move textbox entries to MyArt
ArtList.Add(MyA rt)
SaveFile() 'Serialize ArtList & write
FileStream
End If
End if
End Sub

Nov 21 '05 #1
6 1461
GrandpaB

A try to answer as short as possible.

Public MyArt as New Art
Creates a new object from the class Art and does the sub New in that class

MyArt as New art
Creates a new object from the class Art and does the sub New in that class
The previous MyArt looses his reference and will therefore be deleted by the
Garbage Collector (GC) when that start doing its job.

And not important, an object is forever created on the managed heap.

I hope this helps?

Cor

"GrandpaB" <an*******@disc ussions.microso ft.com>
While writing this plea for help, I think I solved my
dilemma, but I don't know why the problem solving
statement is necessary. The inspiration for the
statement came from an undocumented VB example I found on
the web. I would be most appreciative if someone could
explain why this statement is necessary and what does it
do:

MyArt = New Art

Early in the code, ArtList, MyArt & AddNew had been
declared with the following statements:

Public ArtList as New ArrayList
Public MyArt as New Art
Public AddNew as Boolean

I am creating a Windows application which uses an
ArrayList to contain a small amount of data. ArtList, is
an instance of an ArrayList that will contain multiple
(up to 200) Art objects. MyArt is an instance of the Art
object. In the application I want to add, delete and
edit the individual Art objects in ArtList. I am
serializing and deserializing the ArrayList and using a
FileStream to read and write to the hard drive. This is
the code in question, and the mystery statement is
commented with ******

Private Sub btnNew_Click(By Val sender As System.Object, _
ByVal e As System.EventArg s) Handles btnNew.Click

ClearForm() 'A sub to clear the Form's textboxes
AddNew = True
End Sub

Private Sub btnAdd_Click(By Val sender As System.Object, _
ByVal e As System.EventArg s) Handles btnAdd.Click

Dim Msg1 As String = "Do you want to ADD this new
Object?"
Dim Msg2 As String = "Update Art"
Dim Ans As MsgBoxResult
If FormChanged() And AddNew Then
Ans = MsgBox(Msg1, MsgBoxStyle.Yes No, Msg2)
If Ans = MsgBoxResult.Ye s Then
MyArt = New Art '??? ********* ???
Form2MyArt() 'Move textbox entries to MyArt
ArtList.Add(MyA rt)
SaveFile() 'Serialize ArtList & write
FileStream
End If
End if
End Sub

Nov 21 '05 #2
Cor,

Thanks for your assistance; yes, I think that I'm
starting to gain some insight to improve my
understanding, but I still have a puzzlement.

Let me reitterate to see if I understand. My original
statement:

Public MyArt as New Art

created MyArt as a new Art object. With this object I
was able run the subroutine:

Sub DisplayArt(ByVa l Index As Integer)
'Transfer the ArtList(Index) to MyArt and then to
the form
MyArt = ArtList(Index)
MyArt2Form()
End Sub

and the statements:

Form2MyArt()
ArtList(Index)= MyArt

to sucessfully edit the various objects in ArtList, but
when I wanted to add a item to ArtList I had to include
the statement:

MyArt = New Art

So why could I use the original MyArt to edit various
items in ArtList, but when I wanted to add an item to
ArtList I needed reinitialize MyArt using the following
statements:

MyArt = New Art '??? **** ???
Form2MyArt
ArtList.Add(MyA rt)

Thanks in advance, GrandpaB
-----Original Message-----
GrandpaB

A try to answer as short as possible.

Public MyArt as New Art
Creates a new object from the class Art and does the sub New in that class
MyArt as New art
Creates a new object from the class Art and does the sub New in that classThe previous MyArt looses his reference and will therefore be deleted by theGarbage Collector (GC) when that start doing its job.

And not important, an object is forever created on the managed heap.
I hope this helps?

Cor

"GrandpaB" <an*******@disc ussions.microso ft.com>
While writing this plea for help, I think I solved my
dilemma, but I don't know why the problem solving
statement is necessary. The inspiration for the
statement came from an undocumented VB example I found on the web. I would be most appreciative if someone could
explain why this statement is necessary and what does it do:

MyArt = New Art

Early in the code, ArtList, MyArt & AddNew had been
declared with the following statements:

Public ArtList as New ArrayList
Public MyArt as New Art
Public AddNew as Boolean

I am creating a Windows application which uses an
ArrayList to contain a small amount of data. ArtList, is an instance of an ArrayList that will contain multiple
(up to 200) Art objects. MyArt is an instance of the Art object. In the application I want to add, delete and
edit the individual Art objects in ArtList. I am
serializing and deserializing the ArrayList and using a
FileStream to read and write to the hard drive. This is
the code in question, and the mystery statement is
commented with ******

Private Sub btnNew_Click(By Val sender As System.Object, _ ByVal e As System.EventArg s) Handles btnNew.Click

ClearForm() 'A sub to clear the Form's textboxes
AddNew = True
End Sub

Private Sub btnAdd_Click(By Val sender As System.Object, _ ByVal e As System.EventArg s) Handles btnAdd.Click

Dim Msg1 As String = "Do you want to ADD this new
Object?"
Dim Msg2 As String = "Update Art"
Dim Ans As MsgBoxResult
If FormChanged() And AddNew Then
Ans = MsgBox(Msg1, MsgBoxStyle.Yes No, Msg2)
If Ans = MsgBoxResult.Ye s Then
MyArt = New Art '??? ********* ???
Form2MyArt() 'Move textbox entries to MyArt
ArtList.Add(MyA rt)
SaveFile() 'Serialize ArtList & write
FileStream
End If
End if
End Sub

.

Nov 21 '05 #3
Grandpa

I see it,

When you add that myArt to the arraylist than there is a reference from the
arraylist to it.

Better, it are everytime objects in the arraylist which are referenced and
stay referenced until they are removed from the arraylist or the arraylist
does not exist anymore.

I did not completly look at your code. However probably I would not do it
that way as you do it and use instead of
MyArt = New Art '??? ********* ???

Dim myArt as New art '??? ********* ???

For as far as I can see the code, do I as well not see sense for that
Public MyArt as New Art.

You only need to create objects for in your arraylist from the type of Art.

I hope this helps?

Cor
<an*******@disc ussions.microso ft.com>
Cor,

Thanks for your assistance; yes, I think that I'm
starting to gain some insight to improve my
understanding, but I still have a puzzlement.

Let me reitterate to see if I understand. My original
statement:

Public MyArt as New Art

created MyArt as a new Art object. With this object I
was able run the subroutine:

Sub DisplayArt(ByVa l Index As Integer)
'Transfer the ArtList(Index) to MyArt and then to
the form
MyArt = ArtList(Index)
MyArt2Form()
End Sub

and the statements:

Form2MyArt()
ArtList(Index)= MyArt

to sucessfully edit the various objects in ArtList, but
when I wanted to add a item to ArtList I had to include
the statement:

MyArt = New Art

So why could I use the original MyArt to edit various
items in ArtList, but when I wanted to add an item to
ArtList I needed reinitialize MyArt using the following
statements:

MyArt = New Art '??? **** ???
Form2MyArt
ArtList.Add(MyA rt)

Thanks in advance, GrandpaB
-----Original Message-----
GrandpaB

A try to answer as short as possible.

Public MyArt as New Art
Creates a new object from the class Art and does the sub

New in that class

MyArt as New art
Creates a new object from the class Art and does the sub

New in that class
The previous MyArt looses his reference and will

therefore be deleted by the
Garbage Collector (GC) when that start doing its job.

And not important, an object is forever created on the

managed heap.

I hope this helps?

Cor

"GrandpaB" <an*******@disc ussions.microso ft.com>
While writing this plea for help, I think I solved my
dilemma, but I don't know why the problem solving
statement is necessary. The inspiration for the
statement came from an undocumented VB example I found on the web. I would be most appreciative if someone could
explain why this statement is necessary and what does it do:

MyArt = New Art

Early in the code, ArtList, MyArt & AddNew had been
declared with the following statements:

Public ArtList as New ArrayList
Public MyArt as New Art
Public AddNew as Boolean

I am creating a Windows application which uses an
ArrayList to contain a small amount of data. ArtList, is an instance of an ArrayList that will contain multiple
(up to 200) Art objects. MyArt is an instance of the Art object. In the application I want to add, delete and
edit the individual Art objects in ArtList. I am
serializing and deserializing the ArrayList and using a
FileStream to read and write to the hard drive. This is
the code in question, and the mystery statement is
commented with ******

Private Sub btnNew_Click(By Val sender As System.Object, _ ByVal e As System.EventArg s) Handles btnNew.Click

ClearForm() 'A sub to clear the Form's textboxes
AddNew = True
End Sub

Private Sub btnAdd_Click(By Val sender As System.Object, _ ByVal e As System.EventArg s) Handles btnAdd.Click

Dim Msg1 As String = "Do you want to ADD this new
Object?"
Dim Msg2 As String = "Update Art"
Dim Ans As MsgBoxResult
If FormChanged() And AddNew Then
Ans = MsgBox(Msg1, MsgBoxStyle.Yes No, Msg2)
If Ans = MsgBoxResult.Ye s Then
MyArt = New Art '??? ********* ???
Form2MyArt() 'Move textbox entries to MyArt
ArtList.Add(MyA rt)
SaveFile() 'Serialize ArtList & write
FileStream
End If
End if
End Sub

.

Nov 21 '05 #4
Cor,

Thanks again for the followup. I guess that my question
boils down to: Why can I transfer existing objects, back
and forth, between AtrList(Index) and MyArt after
declaring ArtList and MyArt with:

Public ArtList as New ArrayList
Public MyArt as New Art

but when I want to add a new object to ArtList,
ArtList.Add(MyA rt), I must reinitialize MyArt with:

MyArt = New Art

or, as you suggest, with

Dim MyArt as New Art

The code works and that is my first concern, but I am
attempting to deepen my understanding of VB.

Once again thanks, GrandpaB
-----Original Message-----
Grandpa

I see it,

When you add that myArt to the arraylist than there is a reference from thearraylist to it.

Better, it are everytime objects in the arraylist which are referenced andstay referenced until they are removed from the arraylist or the arraylistdoes not exist anymore.

I did not completly look at your code. However probably I would not do itthat way as you do it and use instead of
MyArt = New Art '??? ********* ???

Dim myArt as New art '??? ********* ???

For as far as I can see the code, do I as well not see sense for thatPublic MyArt as New Art.

You only need to create objects for in your arraylist from the type of Art.
I hope this helps?

Cor
<an*******@dis cussions.micros oft.com>
Cor,

Thanks for your assistance; yes, I think that I'm
starting to gain some insight to improve my
understanding, but I still have a puzzlement.

Let me reitterate to see if I understand. My original
statement:

Public MyArt as New Art

created MyArt as a new Art object. With this object I
was able run the subroutine:

Sub DisplayArt(ByVa l Index As Integer)
'Transfer the ArtList(Index) to MyArt and then to the form
MyArt = ArtList(Index)
MyArt2Form()
End Sub

and the statements:

Form2MyArt()
ArtList(Index)= MyArt

to sucessfully edit the various objects in ArtList, but
when I wanted to add a item to ArtList I had to include
the statement:

MyArt = New Art

So why could I use the original MyArt to edit various
items in ArtList, but when I wanted to add an item to
ArtList I needed reinitialize MyArt using the following
statements:

MyArt = New Art '??? **** ???
Form2MyArt
ArtList.Add(MyA rt)

Thanks in advance, GrandpaB
-----Original Message-----
GrandpaB

A try to answer as short as possible.

Public MyArt as New Art
Creates a new object from the class Art and does the sub
New in that class

MyArt as New art
Creates a new object from the class Art and does the
sub New in that class
The previous MyArt looses his reference and will

therefore be deleted by the
Garbage Collector (GC) when that start doing its job.

And not important, an object is forever created on the

managed heap.

I hope this helps?

Cor

"GrandpaB" <an*******@disc ussions.microso ft.com>

While writing this plea for help, I think I solved my
dilemma, but I don't know why the problem solving
statement is necessary. The inspiration for the
statement came from an undocumented VB example I
found on
the web. I would be most appreciative if someone
could explain why this statement is necessary and what does

it
do:

MyArt = New Art

Early in the code, ArtList, MyArt & AddNew had been
declared with the following statements:

Public ArtList as New ArrayList
Public MyArt as New Art
Public AddNew as Boolean

I am creating a Windows application which uses an
ArrayList to contain a small amount of data. ArtList, is
an instance of an ArrayList that will contain

multiple (up to 200) Art objects. MyArt is an instance of the

Art
object. In the application I want to add, delete and
edit the individual Art objects in ArtList. I am
serializing and deserializing the ArrayList and using a FileStream to read and write to the hard drive. This is the code in question, and the mystery statement is
commented with ******

Private Sub btnNew_Click(By Val sender As

System.Object, _
ByVal e As System.EventArg s) Handles btnNew.Click

ClearForm() 'A sub to clear the Form's textboxes
AddNew = True
End Sub

Private Sub btnAdd_Click(By Val sender As

System.Object, _
ByVal e As System.EventArg s) Handles btnAdd.Click

Dim Msg1 As String = "Do you want to ADD this new
Object?"
Dim Msg2 As String = "Update Art"
Dim Ans As MsgBoxResult
If FormChanged() And AddNew Then
Ans = MsgBox(Msg1, MsgBoxStyle.Yes No, Msg2)
If Ans = MsgBoxResult.Ye s Then
MyArt = New Art '??? ********* ???
Form2MyArt() 'Move textbox entries to MyArt ArtList.Add(MyA rt)
SaveFile() 'Serialize ArtList & write
FileStream
End If
End if
End Sub

.

.

Nov 21 '05 #5

"GrandpaB" <an*******@disc ussions.microso ft.com> wrote
The code works and that is my first concern, but I am
attempting to deepen my understanding of VB.


Imagine you want to fill a parking lot with different styles of cars.
So, you grab a new car (that has interchangable parts) and assign
a new color and interior to it, and put it out in the lot. Then you
grab that same car, and assign a new color and interior to it, and
place it out in the lot. Then you grab that same car again, and
assign a third color and and interior to it and place it back out in
the lot.

How many cars are out in the lot?

There is only one, its the same car, you've just given it different
values. What you need to do is grab a new car each time, and
then assign the values. The same thing happens with objects.

If you continually add the same object to a list, then you end
up with a list where all entries point to the same object. In the
end, that object can only have one complete set of values, so
the list appears to be filled with identical objects, when in fact
its the same object, for each entry in the list. What needs to
be done is to create a new object, when a completely different
object is needed. Obviously enough, to create new objects,
the New keyword is required....

LFS
Nov 21 '05 #6
Grandpa,

When you create a new object you say

Create a new object on the managed heap with all parameters set as build in
or setted in the Sub New and give it a reference in its placeholder for
where it is.

Than you *add* its reference too an arraylist collection of objects.

The arraylist itself is as well an object

You create everytime in your loop a complete new object and add it too that
collection.

At the end when the methode (even directly at every nested part) is ready,
everything created and is on the stack for that will be cleaned up so as
well all references. However your arraylist has in his collection a lot of
references too all those new objects and those will stay because the GC will
see those references.

When you set first
Private myArt as new Art than you create an objecte and you have created
globaly that reference to it in a global placeholder

When you do than
myArt as new Art than you create an object again, and set the reference in
that global placeholder for that last created object.

The reference of the first is therefore completly gone and can (and will)
be deleted by the GC.

However in this case is the last created myArt accesible from that global
placeholder and therefore from everywhere in your class. Therefore I wrote
that I would do it *probably* with dim myArt as new Art.

The reason is that I cannot see if you do something as this

myArt = Art
DoSubFillArt

Where I in that case would do
DoSubFillArt(my Art)

In the first sample directly above, (because you have set the reference of
myArt globaly), you do not need to pass it too that method the last one is
in that global reference, however in my opinion is that not nice
programming.

Is it not simple, I hope this helps?

Cor

"GrandpaB" <an*******@disc ussions.microso ft.com> schreef in bericht
news:2a******** *************** *****@phx.gbl.. .
Cor,

Thanks again for the followup. I guess that my question
boils down to: Why can I transfer existing objects, back
and forth, between AtrList(Index) and MyArt after
declaring ArtList and MyArt with:

Public ArtList as New ArrayList
Public MyArt as New Art

but when I want to add a new object to ArtList,
ArtList.Add(MyA rt), I must reinitialize MyArt with:

MyArt = New Art

or, as you suggest, with

Dim MyArt as New Art

The code works and that is my first concern, but I am
attempting to deepen my understanding of VB.

Once again thanks, GrandpaB
-----Original Message-----
Grandpa

I see it,

When you add that myArt to the arraylist than there is a

reference from the
arraylist to it.

Better, it are everytime objects in the arraylist which

are referenced and
stay referenced until they are removed from the

arraylist or the arraylist
does not exist anymore.

I did not completly look at your code. However probably

I would not do it
that way as you do it and use instead of
MyArt = New Art '??? ********* ???

Dim myArt as New art '??? ********* ???

For as far as I can see the code, do I as well not see

sense for that
Public MyArt as New Art.

You only need to create objects for in your arraylist

from the type of Art.

I hope this helps?

Cor
<an*******@di scussions.micro soft.com>
Cor,

Thanks for your assistance; yes, I think that I'm
starting to gain some insight to improve my
understanding, but I still have a puzzlement.

Let me reitterate to see if I understand. My original
statement:

Public MyArt as New Art

created MyArt as a new Art object. With this object I
was able run the subroutine:

Sub DisplayArt(ByVa l Index As Integer)
'Transfer the ArtList(Index) to MyArt and then to the form
MyArt = ArtList(Index)
MyArt2Form()
End Sub

and the statements:

Form2MyArt()
ArtList(Index)= MyArt

to sucessfully edit the various objects in ArtList, but
when I wanted to add a item to ArtList I had to include
the statement:

MyArt = New Art

So why could I use the original MyArt to edit various
items in ArtList, but when I wanted to add an item to
ArtList I needed reinitialize MyArt using the following
statements:

MyArt = New Art '??? **** ???
Form2MyArt
ArtList.Add(MyA rt)

Thanks in advance, GrandpaB

-----Original Message-----
GrandpaB

A try to answer as short as possible.

Public MyArt as New Art
Creates a new object from the class Art and does the sub New in that class

MyArt as New art
Creates a new object from the class Art and does the sub New in that class
The previous MyArt looses his reference and will
therefore be deleted by the
Garbage Collector (GC) when that start doing its job.

And not important, an object is forever created on the
managed heap.

I hope this helps?

Cor

"GrandpaB " <an*******@disc ussions.microso ft.com>

> While writing this plea for help, I think I solved my
> dilemma, but I don't know why the problem solving
> statement is necessary. The inspiration for the
> statement came from an undocumented VB example I found on
> the web. I would be most appreciative if someone could> explain why this statement is necessary and what does
it
> do:
>
> MyArt = New Art
>
> Early in the code, ArtList, MyArt & AddNew had been
> declared with the following statements:
>
> Public ArtList as New ArrayList
> Public MyArt as New Art
> Public AddNew as Boolean
>
> I am creating a Windows application which uses an
> ArrayList to contain a small amount of data. ArtList, is
> an instance of an ArrayList that will contain multiple> (up to 200) Art objects. MyArt is an instance of the
Art
> object. In the application I want to add, delete and
> edit the individual Art objects in ArtList. I am
> serializing and deserializing the ArrayList and using a> FileStream to read and write to the hard drive. This is> the code in question, and the mystery statement is
> commented with ******
>
> Private Sub btnNew_Click(By Val sender As
System.Object, _
> ByVal e As System.EventArg s) Handles btnNew.Click
>
> ClearForm() 'A sub to clear the Form's textboxes
> AddNew = True
> End Sub
>
> Private Sub btnAdd_Click(By Val sender As
System.Object, _
> ByVal e As System.EventArg s) Handles btnAdd.Click
>
> Dim Msg1 As String = "Do you want to ADD this new
> Object?"
> Dim Msg2 As String = "Update Art"
> Dim Ans As MsgBoxResult
> If FormChanged() And AddNew Then
> Ans = MsgBox(Msg1, MsgBoxStyle.Yes No, Msg2)
> If Ans = MsgBoxResult.Ye s Then
> MyArt = New Art '??? ********* ???
> Form2MyArt() 'Move textbox entries to MyArt> ArtList.Add(MyA rt)
> SaveFile() 'Serialize ArtList & write
> FileStream
> End If
> End if
> End Sub
>
.

.

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3905
by: Stephen | last post by:
I have got an event below to remove items from an arraylist and then to rebind the arraylist to the datagrid subsequently deleting the appropriate row. My problem is that my code makes sense and I think my logic seems fine but when I click the button on my datagrid nothing seems to happen. Have you any idea where Im going wrong. Was thinking it might have something to do with my page load/ postback but not really sure. Can someone please...
3
1468
by: Stephen | last post by:
I've been working on some code which will hopefully allow me to transfer the contents of an arraylist on one page over to another page. The Arraylist is held in the viewstate object as it is populated on the on-click event of a button. Im trying to move to another page and carry over the items in my arraylist and write them to the page. The code ive been trying to work with to achieve is detailed below. I am getting an error and im not...
2
7811
by: Stephen | last post by:
I am trying to delete a row in a datagrid on the onclick of a asp:ButtonColumn. The datagrid is created from the items in an arraylist so what im trying to do is remove the item from the array and then rebind the datagrid. Below is the code I have to delete the items from the arraylist but nothing seems to happen when I run this code. Does any one have any idea where Im going wrong. Thanks for any help you can give me. private void...
3
2859
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a datagrid. I am using the viewstate object to store the Arraylist items on the page on postback. My PROBLEM is that I need to redirect the user to a new aspx page and on this new page i need to be able to access the items in my arraylist. Is this...
9
1413
by: Leon | last post by:
I have a webform in which when the user press generate button the form generate six unique ramdon numbers, the user can also type these six numbers in manually in any order. however, the user can also press a post button that post these six numbers into the database. My problem is that these six numbers need to be posted to the database from less to greatest, and all of my code is within the business tier class not the code behind class. ...
7
1797
by: Dave | last post by:
Hi all, I have... using System.Collections; namespace MyApp.Templates { public class MyPage : System.Web.UI.Page { ArrayList MyArray = new ArrayList();
6
5387
by: gane kol | last post by:
Hi, I have a code that creates a datatable from an arraylist, but i am getting an error in casting in for (int intRow = 0; intRow < alLCPlist.Count; intRow++) { DataRow drow = dtLCPack.NewRow(); int intColCount = dtLCPack.Columns.Count; ArrayList arrlRow = (ArrayList)alLCPlist; <== Specified cast
18
4745
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the class where only the "searched" property has a value. I expected to get the index into the arraylist where I could then get the entire class instance. However, the 'indexof' is never calling my overloaded, overrides Equals method. Here is the...
6
3141
by: fniles | last post by:
I am using VB.NET 2003 and a socket control to receive and sending data to clients. As I receive data in 1 thread, I put it into an arraylist, and then I remove the data from arraylist and send it to the client. Before adding data to the arraylist, I check if the depth of the arraylist is longer than iMaxQueueDepth, and if it is, I clear the arraylist. Is it possible that while I am clearing the arraylist, the ThreadMain at the same time...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5307
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3964
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3564
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.