Click here to Skip to main content
14,266,639 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Pro Tip Pin
PIEBALDconsult19-Jul-19 10:27
protectorPIEBALDconsult19-Jul-19 10:27 
GeneralRe: Pro Tip Pin
Nelek19-Jul-19 10:51
protectorNelek19-Jul-19 10:51 
GeneralRe: Pro Tip Pin
dandy7219-Jul-19 11:18
memberdandy7219-Jul-19 11:18 
GeneralRe: Pro Tip Pin
Slacker00719-Jul-19 13:50
professionalSlacker00719-Jul-19 13:50 
GeneralRe: Pro Tip Pin
theoldfool19-Jul-19 14:47
professionaltheoldfool19-Jul-19 14:47 
GeneralThere is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 4:54
memberhoney the codewitch19-Jul-19 4:54 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Ravi Bhavnani19-Jul-19 5:21
professionalRavi Bhavnani19-Jul-19 5:21 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:23
memberhoney the codewitch19-Jul-19 5:23 
You're absolutely right, but unfortunately .NET's generics are not covariant.

So I could not pass a
List<IList<string>>
to something that took
IEnumerable<IEnumerable<string>>
or even
IList<IEnumerable<string>>
- it doesn't fly.

If .NET's covariance worked more like C++'s I'd have done like you suggested.

But as it is, utility beats theory at the end of the day.


I think of it as a workaround for a limitation of .NET

The other option is to copy them but this method is resource hungry enough

Fortunately, grotty as it is, it's a private method.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.


modified 19-Jul-19 11:29am.

GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Richard Deeming19-Jul-19 5:32
mveRichard Deeming19-Jul-19 5:32 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:36
memberhoney the codewitch19-Jul-19 5:36 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Richard Deeming19-Jul-19 5:44
mveRichard Deeming19-Jul-19 5:44 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:48
memberhoney the codewitch19-Jul-19 5:48 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
PIEBALDconsult19-Jul-19 5:33
protectorPIEBALDconsult19-Jul-19 5:33 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:38
memberhoney the codewitch19-Jul-19 5:38 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
PIEBALDconsult19-Jul-19 6:09
protectorPIEBALDconsult19-Jul-19 6:09 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 6:11
memberhoney the codewitch19-Jul-19 6:11 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Richard Deeming19-Jul-19 5:35
mveRichard Deeming19-Jul-19 5:35 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:37
memberhoney the codewitch19-Jul-19 5:37 
JokeRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Member 1433107619-Jul-19 5:46
memberMember 1433107619-Jul-19 5:46 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:47
memberhoney the codewitch19-Jul-19 5:47 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Sander Rossel19-Jul-19 19:00
professionalSander Rossel19-Jul-19 19:00 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 21:49
memberhoney the codewitch19-Jul-19 21:49 
GeneralThought of the Day Pin
OriginalGriff19-Jul-19 4:39
protectorOriginalGriff19-Jul-19 4:39 
GeneralRe: Thought of the Day Pin
PeejayAdams19-Jul-19 4:58
memberPeejayAdams19-Jul-19 4:58 
GeneralRe: Thought of the Day Pin
DRHuff19-Jul-19 5:31
memberDRHuff19-Jul-19 5:31 

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.