Hi Robert and Team, and anyone else with knowledge,
I have a small (but interesting?) problem, while converting work C# app code to X#. So far everything has translated as I thought it should / would. Until now when I come to 'IEnumerable'.
Both C# and X# apps are targeted at the .NET 4.5.2 but the C# code allows me to use a 'Type' free form of IEnumerable, whereas the X# code gives me an error unless I use the Typed form.
I include image detail so you can see what I meant. Can you explain to me WHY ? anybody ?
Also, there is the image with the X# interesting way out for me - the use of 'local implied' - works a treat. Can anyone explain PLEASE ?!
I hope you understand my problem from the image detail supplied.
TIA,
and Regards,
Phil.
Wales, UK.
X# differes from C# ? - IEnumerable ?? Help ???
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
X# differes from C# ? - IEnumerable ?? Help ???
Hi Phil,
My guess is that you are using in your code a USING System.Collections.Generic and not a USING System.Collections, so the compiler tries to use the generic version of IEnumerable. But without seeing the complete prg file, this is only a guess.
Chris
My guess is that you are using in your code a USING System.Collections.Generic and not a USING System.Collections, so the compiler tries to use the generic version of IEnumerable. But without seeing the complete prg file, this is only a guess.
Chris
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
X# differes from C# ? - IEnumerable ?? Help ???
Hi Chris,
You are 'spot on' !
What a clever man you are ;-0)
This is the result of chopping up code, cut and paste, drag and copy, and all that sort of thing to make life easier. From one open instance of VS to another.
Still, we live and learn - I try to learn at least one new thing each day - this is a good start !!!
And 'local implied' did get me out of a hole when I did not know what else to do ;-0)
Now then ... upwards and onwards >>>
Cheers,
Phil.
Wales, UK.
You are 'spot on' !
What a clever man you are ;-0)
This is the result of chopping up code, cut and paste, drag and copy, and all that sort of thing to make life easier. From one open instance of VS to another.
Still, we live and learn - I try to learn at least one new thing each day - this is a good start !!!
And 'local implied' did get me out of a hole when I did not know what else to do ;-0)
Now then ... upwards and onwards >>>
Cheers,
Phil.
Wales, UK.