D
dotNETnews
This clas creates new movie.
--------------CODE--------------
Public Class AllMovies
Sub New(ByVal MovieName As String, ByVal MovieLenght As Integer)
Movie = MovieName
Lenght = MovieLenght
End Sub
Public Movie As String
Public Lenght As String
End Class
-----------END CODE-------------
Then I use Click event of the button to create object and add it to
ArrayList.
--------------CODE--------------
Private Sub AddMovie_Click(...) Handles AddMovie.Click
Dim movie As AllMovies = New AllMovies(TextBox1.Text, TextBox2.Text)
MovieCollection.Add(movie)
End Sub
-----------END CODE-------------
Is there any way I could name the new object As movie1, movies2, movie3 and
so on. Right now all of my on+bjects in ArrayList are called movie.
--------------CODE--------------
Public Class AllMovies
Sub New(ByVal MovieName As String, ByVal MovieLenght As Integer)
Movie = MovieName
Lenght = MovieLenght
End Sub
Public Movie As String
Public Lenght As String
End Class
-----------END CODE-------------
Then I use Click event of the button to create object and add it to
ArrayList.
--------------CODE--------------
Private Sub AddMovie_Click(...) Handles AddMovie.Click
Dim movie As AllMovies = New AllMovies(TextBox1.Text, TextBox2.Text)
MovieCollection.Add(movie)
End Sub
-----------END CODE-------------
Is there any way I could name the new object As movie1, movies2, movie3 and
so on. Right now all of my on+bjects in ArrayList are called movie.