Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 13 results for
ienumberable
- Page 1
Create IEnumberable from interface
Programming
Software Development
13 Years Ago
by philiop
Hi, I'm doing a short test for a job interview that I have. The code is C# and I am very new to this (2 days :S). One of the questions is. Write method to get all IPeople - Write a method in the SchoolManager to get all IPeople (Teachers and Students) in the system. Your method should return an IEnumerable of IPeople. You can make use of the …
Re: Create IEnumberable from interface
Programming
Software Development
13 Years Ago
by Momerath
[code]IEnumerable<IPeople> GetAllPeople() { foreach (IPeople person in GetAllTeachers()) { yield return person; } foreach (IPeople person in GetAllStudents()) { yield return person; } }[/code] You'll have to fix the errors because I don't know what the classes are that contain GetAllXXX() methods.
Re: Create IEnumberable from interface
Programming
Software Development
13 Years Ago
by philiop
Thank you momerath for the answer. That seems to be working how ever when I try and bind the result to a GridView I get this error Property accessor 'FullName' on object 'School.Code.Student' threw the following exception:'Object does not match target type.' Now fullname refers to the partial class in Student and Teacher like so. [CODE]…
Re: Create IEnumberable from interface
Programming
Software Development
13 Years Ago
by philiop
Never Mind. After looking into a further question I only need to bind this to a ListView and bind the data that way.
Re: Converting C# ideas to C++ (part 3)
Programming
Software Development
13 Years Ago
by jonsca
…] System::Collections::Generic [/icode] or qualify it as [icode] Generic::
IEnumberable
<Item ^> [/icode] You're not going to be…
Re: Combination .....
Programming
Software Development
13 Years Ago
by Momerath
…'s not quite fully generic (it uses IEnumerable rather than
IEnumberable
<T>, etc.)
Re: Combination .....
Programming
Software Development
13 Years Ago
by Kath_Fish
…'s not quite fully generic (it uses IEnumerable rather than
IEnumberable
<T>, etc.)[/QUOTE] How about if i don…
Re: "Specified cast is not valid." - but it is - isn't it?!
Programming
Software Development
13 Years Ago
by Momerath
…. Try changing the type in Line 6 of Program to
IEnumberable
<SRType>. That should be the only thing you…
Re: Combination .....
Programming
Software Development
13 Years Ago
by Kath_Fish
…'s not quite fully generic (it uses IEnumerable rather than
IEnumberable
<T>, etc.)[/QUOTE] Can u show the combination…
Re: help for fix the error..
Programming
Software Development
13 Years Ago
by Momerath
To explain a little more, foreach expects the last argument (the one after the in) to have implemented the interface IEnumerable or
IEnumberable
<T>.
Re: Filter IENumerable of Interface with property of class outside of interface
Programming
Software Development
13 Years Ago
by Momerath
[code]
IEnumberable
<IPeople> GetPeopleForCourse(int courseID) { foreach(IPeople person in …
Re: for loop vs foreach c#
Programming
Software Development
9 Years Ago
by DaveAmour
… foreach then the collection you are iterating over must implement
IEnumberable
or IEumerable<T>. Almost all collections do. Here…
Re: Container for Questions in Trivia Game
Programming
Software Development
9 Years Ago
by DaveAmour
… if you have a Deck class you can then implement
IEnumberable
and your deck is then both a collection of questions…
Search
Search
Forum Categories
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
Forums
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
© 2024 DaniWeb® LLC