Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
GeneralContext Menu Strips Pin
MarkMokris1-Mar-08 4:53
MarkMokris1-Mar-08 4:53 
AnswerRe: Context Menu Strips Pin
Eslam Afifi1-Mar-08 10:41
Eslam Afifi1-Mar-08 10:41 
GeneralSemi-Transparent Form Click Pass-Through Pin
User 127821-Mar-08 4:10
User 127821-Mar-08 4:10 
GeneralRe: Semi-Transparent Form Click Pass-Through Pin
mav.northwind1-Mar-08 6:02
mav.northwind1-Mar-08 6:02 
GeneralRe: Semi-Transparent Form Click Pass-Through Pin
User 127824-Mar-08 17:09
User 127824-Mar-08 17:09 
QuestionC# Pin
Nath1-Mar-08 0:15
Nath1-Mar-08 0:15 
GeneralRe: C# Pin
yogesh_kumar_agarwal1-Mar-08 0:28
yogesh_kumar_agarwal1-Mar-08 0:28 
GeneralRe: C# Pin
Luc Pattyn1-Mar-08 0:49
sitebuilderLuc Pattyn1-Mar-08 0:49 
JokeRe: C# Pin
Xmen Real 1-Mar-08 2:32
professional Xmen Real 1-Mar-08 2:32 
GeneralRead the forum guidelines Pin
pmarfleet1-Mar-08 2:32
pmarfleet1-Mar-08 2:32 
GeneralRe: Read the forum guidelines Pin
Not Active1-Mar-08 9:19
mentorNot Active1-Mar-08 9:19 
GeneralRe: C# Pin
Paul Conrad1-Mar-08 12:29
professionalPaul Conrad1-Mar-08 12:29 
GeneralImplementing IEnumerable<t></t> Pin
Jammer1-Mar-08 0:14
Jammer1-Mar-08 0:14 
GeneralRe: Implementing IEnumerable Pin
Not Active1-Mar-08 2:19
mentorNot Active1-Mar-08 2:19 
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 2:28
Jammer1-Mar-08 2:28 
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 3:01
Jammer1-Mar-08 3:01 
GeneralRe: Implementing IEnumerable Pin
papadimitriou1-Mar-08 3:51
papadimitriou1-Mar-08 3:51 
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 4:01
Jammer1-Mar-08 4:01 
Ahhhh ... Thanks for the reply. Just before your reply came through I was repeatedly trying the code in various configs and then noticed that hovering over my code I now say that the class was getting an IEnumerable added but with the following error when I expanded the node:

base {System.Exception} = {"Unable to cast object of type 'SampleSort.DataLayer.BuildGenericLists' to type 'System.Collections.IEnumerator'."}


Changing to your suggestion:

public IEnumerator GetEnumerator ()
{

return MainFileTableObject ;
}


Now makes the compiler report:

Cannot implicitly convert type 'System.Collections.Generic.List<samplesort.datalayer.buildgenericlists.filelist>' to 'System.Collections.IEnumerator'. An explicit conversion exists (are you missing a cast?)</samplesort.datalayer.buildgenericlists.filelist>


I'm assuming that's progress! Smile | :)

I've seen examples using this yield keyword, that's new to C# 3.0 isn't it? (Which I'm using) so it would be good to implement the newer way of doing things.

I'm sure this is also due to my shallow understanding at the moment but my code is just producing an empty generic list so doing a foreach over it will add what exectly? Or is this code here in order to build in that functionality to the object rather than actually perform a foreach on an empty list?

Thanks loads for your help.
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 4:05
Jammer1-Mar-08 4:05 
GeneralRe: Implementing IEnumerable Pin
papadimitriou1-Mar-08 4:16
papadimitriou1-Mar-08 4:16 
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 4:23
Jammer1-Mar-08 4:23 
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 5:27
Jammer1-Mar-08 5:27 
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 8:35
Jammer1-Mar-08 8:35 
GeneralRe: Implementing IEnumerable Pin
buchstaben1-Mar-08 8:40
buchstaben1-Mar-08 8:40 
GeneralRe: Implementing IEnumerable Pin
Jammer1-Mar-08 8:50
Jammer1-Mar-08 8:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.