need2progm
Programmer
I am trying to randomize a collection before populating a dropdown box.
.net has a Random class.. I can not have any repeated data
As it stands now I have a class in my business layer where I create a collection in a property that is reference by an aspx page. This is where I would like to randomize.. before it gets returned.
Business layer class obj..
Try
SqlSelectMGID(MatchGroupID)
'Loop and add to collection
For Each drAccount In OneDS.Account.Rows
newCollection.Add(New Account(drAccount,User))
Next
Catch ex As Exception
Throw ex
End Try
'This is where I would like to randomize .. Would an ArrayList have more functionality that would make this easier?
Return newCollection
Away from programming 101 ..there has to be a better way then creating a temp obj to hold objs and write a function blah..blah..blah
Thanks for any thoughts
.net has a Random class.. I can not have any repeated data
As it stands now I have a class in my business layer where I create a collection in a property that is reference by an aspx page. This is where I would like to randomize.. before it gets returned.
Business layer class obj..
Try
SqlSelectMGID(MatchGroupID)
'Loop and add to collection
For Each drAccount In OneDS.Account.Rows
newCollection.Add(New Account(drAccount,User))
Next
Catch ex As Exception
Throw ex
End Try
'This is where I would like to randomize .. Would an ArrayList have more functionality that would make this easier?
Return newCollection
Away from programming 101 ..there has to be a better way then creating a temp obj to hold objs and write a function blah..blah..blah
Thanks for any thoughts