Omgili - forum search, search forums  
  

Discussions about collection

Displaying 1 - 10 out of 144,442 discussions.  
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
In .NET (VB), how can I take all of the items in one collection, and add them to a second collection (without losing pre-existing items in the second collection)? I'm looking for something a little more efficient than this: For Each item As Host In hostCollection...
Started by on , 9 posts by 9 people.  
I know you're asking for VB, but in C# you can just use the constructor of the collection Ben's solution does exist for VB.Net: Dim collection As IEnumerable(Of T) Dim instance As New List(collection) Here is the linked documentation....
What are the recommendations for exposing a custom collection vs generic one? e.g public class ImageCollection : Collection<Image> { ... } public class Product { public ImageCollection {get; set;} } VS public class Product { public Collection<...
Started by on , 7 posts by 7 people.  
Extensibility....
If you're building a public API, consider using a custom collection for the following advantages.
Are not interested responding to or watching these collection modifications then a List<T> is a more appropriate type.
Hi All, I am getting confused as and when i come across a generic method of this sort? public static <T> T addAndReturn(T element, Collection<T> collection){ collection.add(element); return element; } The reason being is that i could not understand...
Started by on , 7 posts by 7 people.  
Collection<int> intCollection = new Collection(); int addedInt = addAndReturn(5, intCollection as a single type is required obviously....
In the case you supplied T is the type of element you are adding to the collection.
That is returned.
Ask your Facebook Friends
Both methods appear to produce the same results , but I've been hard-pressed to actually convince people that the second method works, since it's apparently not commonly known. // Create some data var foo = { 'vals':[ {'id':'foo'}, {'id':'bar'} ] } ; ...
Started by on , 3 posts by 3 people.  
The difference between the two is actually exponential depending on... .
Coming from .NET land...it just makes more sense to me and makes things easier to read .
I'm not sure what everybody else says...but I almost exclusively use your second method there .
Please suggest an easiest way to get a random collection of count 'n' from a collection having 'N' items. where n <= N
Started by on , 5 posts by 5 people.  
Further.
Shuffle the collection into a random order and take the first n items from the result.
For those of you that like puzzles: I had this problem recently and am sure there must be a nicer solution. Consider : an ObservableCollection of Foo objects called foos . Foo contains a string ID field I have no control over foos foos will be changing...
Started by on , 3 posts by 3 people.  
Sounds like a job for a custom observable collection that implements IEnumerable and has a pretty at Bindable LINQ ? It allows you to define LINQ queries on top of an observable collection, and makes sure that the LINQ query is performed....
How do I determine whether an object is a member of a collection in VBA? Specifically, I need to find out whether a table definition is a member of the TableDefs collection.
Started by on , 9 posts by 8 people.  
Can you iterate over the TableDefs collection....
Your best bet is to iterate over the members of the collection and see if any match what you) is to catch the "Item not in collection" error and then set a flag to say the item does not exist.
Situation: I've created a DataGrid in XAML and the ItemsSource is binded to an ObservableCollection of a certain class that contains properties. Then in C#, I create a DataGridTextColumn and a DataGridComboBoxColumn and binded these to the properties ...
Started by on , 6 posts by 6 people.  
Good luck! To fix your ItemsSource - I think there is a confusion... .
Right now it looks like from, and that your DataGrid is bound to a collection of StatsOperation.
Have it, and the ComboBox column ItemsSource should be bound to a Collection.
Is there any way to access the collection of current sessions in ASP.NET globally from the application? Thanks.
Started by on , 4 posts by 4 people.  
I don't think so, but you can manage your own list in the global.a shared collection }....
Is managing a psueudo-session collection in the shared Application object and implement the Session_Start method to populate that collection.
How to loop through a collection that supports IEnumerable?
Started by on , 6 posts by 6 people.  
} ....
A regular for each will do: foreach (var item in collection) { // do your stuff } foreach (var element in instanceOfAClassThatImplelemntIEnumerable) { } foreach(var element in collection(YourItemType item in collection) { ...
Page: 1   2   3   4   5   6   7   8   9   10  
Related Searches
Collection    amateur collection    Avington collection    Star Collection    hql fetch collections    anal creampie collection    the sims collection fxp    lavender jewel collection    target hudson collection    zelda porn collection   
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost