Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 612 results for
ienumerable
- Page 1
IEnumerable & its using
Programming
Software Development
14 Years Ago
by vedro-compota
… public string lastName; } public class People : [U]
IEnumerable
[/U] { private Person[] _people; public People(Person[] […{ _people[i] = pArray[i]; }[/B] } [B]IEnumerator
IEnumerable
.GetEnumerator() { return (IEnumerator) GetEnumerator(); } public PeopleEnum GetEnumerator() { …
Re: IEnumerable & its using
Programming
Software Development
14 Years Ago
by vedro-compota
…] but why we need this piece (of code)) - [CODE] IEnumerator
IEnumerable
.GetEnumerator() { return (IEnumerator) GetEnumerator(); } [/CODE] what is this (I can…'t understand syntax) - [CODE]IEnumerator
IEnumerable
.GetEnumerator()[/CODE] what is this (I can't understand syntax…
Re: IEnumerable & its using
Programming
Software Development
14 Years Ago
by Momerath
When something implements
IEnumerable
it needs a method called GetEnumerator that returns and … to iterate through the collection. The syntax of [icode]
IEnumerable
.GetEnumerator()[/icode] is what as known as an explicit implementation… means that you can only access that member through an
IEnumerable
object, not an object of the class. There is…
Re: IEnumerable & its using
Programming
Software Development
14 Years Ago
by ddanbe
pArray is short for personArray I guess. pArray stands indeed for an array of Person. You can pass an array of Person to the constructor of the People class. Because the People class inherits from the
IEnumerable
interface it has to implement its methods.
Re: IEnumerable & its using
Programming
Software Development
14 Years Ago
by vedro-compota
I don't understand - if my class inherits from
IEnumerable
- how should describe such class? as i understand i should implement two methods - one of them is "<T>".....
iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by =OTS=G-Man
…gt; _videos = new List<Video>(); private
IEnumerable
<Video> _videos; private int _videoCount; public … private void btnClose_Click(object sender, EventArgs e) { Close(); } private
IEnumerable
<Video> getVideos() { Feed<Video> feed = null…
Re: Custom Collection Implementing IEnumerable
Programming
Software Development
14 Years Ago
by apegram
…_hrefs.Add(href); } public void AddRange(
IEnumerable
<Href> hrefs) { _hrefs.AddRange…return _hrefs.GetEnumerator(); } System.Collections.IEnumerator System.Collections.
IEnumerable
.GetEnumerator() { return this.GetEnumerator(); } } [/CODE…
Custom Collection Implementing IEnumerable
Programming
Software Development
14 Years Ago
by PierlucSS
…> GetEnumerator() { return hrefs.GetEnumerator(); } System.Collections.IEnumerator System.Collections.
IEnumerable
.GetEnumerator() { return hrefs.GetEnumerator(); } } [/code] I'm not quite sure…
Entity Framework ObjectResult As IEnumerable
Programming
Web Development
12 Years Ago
by john.gale.92102
…(Of T), and the view is expeting
IEnumerable
. I have tried various ways of casting the…a model item of type 'System.Collections.Generic.
IEnumerable
`1[gbip_new.Firm]'. I have tried changing …= "") As ActionResult Dim firms As
IEnumerable
(Of Global.gbip_new.Firm) Dim firmResult As ObjectResult(…
Re: Custom Collection Implementing IEnumerable
Programming
Software Development
14 Years Ago
by apegram
…that case, rethink the example. You should not implement
IEnumerable
, but rather expose a collection via a property that… returns an
IEnumerable
. Here's an example of what I'm …Bar bar) { bars.Add(bar); } public void AddBarRange(
IEnumerable
<Bar> bars) { this.bars.AddRange(bars); } …
Re: iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by Momerath
I suspect it is having to make a call to YouTube on each iteration of the
IEnumerable
.
Re: iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by =OTS=G-Man
…, downloading the feed any time you access the Video.Entries
IEnumerable
. So I guess Ill have to live with it, because…
Sequence Generation using IEnumerable<T>
Programming
Software Development
14 Years Ago
by Momerath
…How do we improve on this? That's where
IEnumerable
<T> comes in. Let's rewrite…int i in FibSequence(5)) { Console.WriteLine(i * 3); } }
IEnumerable
<int> FibSequenece(int count) { int fibCurrent = 1; int…long sequence requests. As you can see, using
IEnumerable
has the benefits of both the other methods: …
Implement IDisposable and IEnumerable
Programming
Software Development
9 Years Ago
by Suzie999
… I now need to implement IDisposable class Class1 :
IEnumerable
<Class12> { ;stuff } How can I do that? My …first thought was class Class1 :
IEnumerable
<Class12> : IDisposable { ;stuff } Which I obviously cannot do…
Filter IENumerable of Interface with property of class outside of interface
Programming
Software Development
13 Years Ago
by philiop
…{ get; } } }[/CODE] I then needed to create an
IENumerable
value of IPeople which I did using [CODE] public…a particular Course. Your method should return an
IENumerable
of IPeople and make use of the existing GetAllIPeople…
thread creating IEnumerable<string>
Programming
Software Development
12 Years Ago
by anisha.silva
… and in it i have a method `public
IEnumerable
<string> Execute(
IEnumerable
<string> input) ` when i trying creating…;Error 2 Argument 1: cannot convert from 'System.Collections.Generic.
IEnumerable
<string>' to 'System.Threading.ParameterizedThreadStart'Program.cs 25…
Re: Filter IENumerable of Interface with property of class outside of interface
Programming
Software Development
13 Years Ago
by philiop
… gave me and managed to get it working :) [CODE] public
IEnumerable
<IPeople> GetPeopleForCourse(int courseID) { Course c = new Course…
Binding the results of an IEnumerable<int> to a combobox
Programming
Software Development
11 Years Ago
by tanatos.daniel
I would like to do something like this: comboBox6.Items.AddRange(new
IEnumerable
<int> { Enumerable.Range(1,8).ToArray() } ); (add numbers 1 to 8 to ComboBox Items using an
IEnumerable
object), but i can't figure out how. Thanks.
Re: IEnumerable & its using
Programming
Software Development
14 Years Ago
by Mitja Bonca
pArray is an array of custom object, in your case the Person is a class. Array of cusom class means you have (will have) more then one Person. If there is more then one, you need to put them into an array for having them together. Mitja
Re: IEnumerable & its using
Programming
Software Development
14 Years Ago
by vedro-compota
[U][B]Momerath[/B][/U], thanks for the detailed explanation!
Re: IEnumerable & its using
Programming
Software Development
14 Years Ago
by vedro-compota
I need to create a generic class that implements the "mathematical set" based on an array ..... should be able to work with foreach ......
Re: iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by Geekitygeek
Can you show the code for your Video class?
Re: iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by =OTS=G-Man
the video class is right from the Google.YouTube assembly here is the <Video> class [url]http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/src/youtube/youtuberequest.cs#408[/url] and figured I would post the feed.entries code [url]http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/src/core/feedmodel.cs#…
Re: iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by alc6379
Momerath's probably right... How long does it usually take for your getVideos method to run? I didn't see code for that. I'd step through it with a debugger, and look at exactly what properties are being returned in that Video object.
Re: iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by =OTS=G-Man
I added some timers to the initVideos() function [code=c#] public void initVideos() { _parent.updateStatusBar("Loading your videos"); Cursor = Cursors.WaitCursor; _stopWatch.Start(); _videos = getVideos(); _stopWatch.Stop(); …
Re: iterating IEnumerable is very slow
Programming
Software Development
14 Years Ago
by Geekitygeek
What type is oblstVideos? I dont recall a standard listview having a SetObjects method.
Re: Custom Collection Implementing IEnumerable
Programming
Software Development
14 Years Ago
by PierlucSS
Thanks for the solution even though I know I can do that, the point of this was to understand and implement a "yield return", is there a way I can do this with this class?
Re: Custom Collection Implementing IEnumerable
Programming
Software Development
14 Years Ago
by PierlucSS
Thanks for your help apegram, it helps me in the understanding of yield and I realise it doesnt correspond to my needs ;) Thank you Boss! :)
Re: Sequence Generation using IEnumerable<T>
Programming
Software Development
14 Years Ago
by ddanbe
This should be in the form of a snippet or tutorial!
Re: Sequence Generation using IEnumerable<T>
Programming
Software Development
14 Years Ago
by Momerath
I submitted it as a tutorial put it didn't seem to take. Let me try it again :)
1
2
3
11
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC