Is this along the lines as what you are trying to tell me, but I have yet to grasp? If so then I haven't figured out how to have the j and j-1 in there so it compares the different values.
If StrComp(udtMovie.sYear, udtMovie.sYear, CompareMethod.Text) Then
Are you saying it is suppose to be like this? maybe it doesn't work like it is suppose to because it is an object? tells me it is not a valid operator for the type. I do thank you for trying to get me to understand . I just seem not to be able to comprehend this part.
Sub SortYear(ByVal...
It is obvious to me that I am lacking something to understand how to do this. I tried adding the j and j-1 to the if statement but guess that was not it, and tried other variations of the if statement to no avail.
Am I going in the right direction with this? This seems to switch the first one with the second one but not the second one with the first one.
If objMovieArray.IndexOf(objMovieArray, udtMovie.sYear) > objMovieArray.IndexOf(objMovieArray, udtMovie.sYear) - 1 Then
temp =...
I guess I am just a bit lost. Yes I want to sort the array. But I have to sort the array by each element. It is to be done by clicking on a menu item for instance Year is one of the menu items. When you click on Year it will sort the array by Year.
When trying to use that bit of code you provided in my Sub to call it in the form. I get an error message: "An unhandled exception of type 'System.MissingMemberException' occurred in microsoft.visualbasic.dll
Additional information: Public member 'GetUpperBound' on type 'Integer' not found."
I...
Thanks for helping me to understand a bit more on what I am after. Trying the sort I am getting stuck on actually how to do it exactly. here is what I have so far by using your explanation. I get an exception error:
Specified cast is not valid.
Sub SortYear(ByVal objMovieArray As Object)
Dim L1...
I was just always taught to used the fixedstring when making a structure. I added a function to return a string instead of type for it. Is that what I should have done to begin with?
Public Overrides Function ToString() As String
Return Title & vbTab & Year & vbTab & sngPrice
End Function...
I am fairly new to vb.net and was wanting to make a bubble sort from this information. From searching the net I found some but still do not understand how to do it with what I have.
Here is all of the code that I have and guidance on where to start to do a bubble sort ? I have a menu with each...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.