|
Won't matter to me as it will never be supported by the CodeDOM =)
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.
|
|
|
|
|
They don't buzz, but they are definitely insects! (7)
HUMBUGS[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Urgh.... so obvious once you know the answer.
I gathered it would be some sort of confectionery, but the sweet shop was just too large!
|
|
|
|
|
I'm really glad it was "obvious with the answer" - means it wasn't impossible!
So ... I'm up tomorrow ... :EvilLaugh:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Simple and Difficult at the same time.
Knew it was something sweet but was focusing on Honey for some reason
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
super wrote: was focusing on Honey for some reason
He's busy playing with nested classes.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That's the problem with honey, once you are in it's difficult to get out.
|
|
|
|
|
In C#, this is valid:
class A<T> {
class B<TT> {
}
}
therefore, this is valid:
typeof(A<int>.B<int>)
The trouble is, there's absolutely nothing out there online I can find about representing such a nested generic typereference as a CodeTypeReference properly.
Which leads me to an arcane comment in Microsoft's reference sourcecode - the last hope of the desperate.
while (current >= 0)
{
if (typeName[current] == '[')
{
if (--unmatchedRightBrackets == 0) break;
}
else if (typeName[current] == ']')
{
++unmatchedRightBrackets;
}
else if (typeName[current] == ',' && unmatchedRightBrackets == 1)
{
if (current + 1 < subTypeNameEndIndex)
{
subTypeNames.Push(typeName.Substring(current + 1, subTypeNameEndIndex - current - 1));
}
subTypeNameEndIndex = current;
}
--current;
}
So now I get to figure out what this is doing, just so I can figure out how to properly use what it is implementing.
Microsoft Docs: Technically correct, but practically useless.
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.
|
|
|
|
|
I don't think that's quite the same thing is it?
The MS one is a Dictionary<string, List<int>> which isn't really "nested" in the same way as yours is.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Yeah you know, i figured that out about a minute ago. *headdesk*
which led me to this
var c = new CodeTypeReference();
c.BaseType = "A`1+B`1";
c.TypeArguments.Add(new CodeTypeReference("System.String"));
c.TypeArguments.Add(new CodeTypeReference("System.Int64"));
Console.WriteLine(CD.ToString(c));
which led me to figuring out kind of how it works, but it isn't pretty.
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.
|
|
|
|
|
honey the codewitch wrote: you know, i figured that out about a minute ago
"Great minds" and all that.
Or "fools seldom differ" - your choice!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I think that's a perspective thing. I feel like the C# language spec is laughing at me right now.
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.
|
|
|
|
|
Quote: Microsoft Docs: Technically correct, but practically useless. Still far better than most of the 'competitors' ones.
|
|
|
|
|
While you're not wrong, that's more of a blanket condemnation of the industry than anything.
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.
|
|
|
|
|
Yes, I know that.
|
|
|
|
|
Did you not mistake [ for ] ?
|
|
|
|
|
nope. that's microsoft's code
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.
|
|
|
|
|
Somehow, this is perfectly valid
var type = typeof(A<A<int>.B<string>>.B<A<A<string>.B<A<InsufficientMemoryException>>>>);
I have no idea how to read it, but Visual Studio is OK with it
I chose the InsufficientMemoryException because that's what whoever has to maintain this code will run into
|
|
|
|
|
now make me a CodeTypeReference instance that properly represents that.
I think I finally know how.
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.
|
|
|
|
|
honey the codewitch wrote: now make me a CodeTypeReference instance that properly represents that.
var x = new CodeTypeReference(...); The rest is an exercise for the reader.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It's cruel to mess with a recently quitted smoker
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.
|
|
|
|
|
I thought you'd quit quitting for the moment? Have you quit quitting quitting, or does it go deeper down the rabbit hole? Should I get myself a Red Pill?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I relapsed over thanksgiving but i'm back on the wagon
Though this code is liable to make me do so again. I just found a really obscure bug in one of microsoft's CodeDOM objects. /hipster
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.
|
|
|
|
|
No? Then it's about time for that. But be careful, this is a synonym for a diabetical coma[^].
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
This "cake" has long traditions as a Christmas sweet in Norway. Everyone knows it by the name of "Delfiakake" - "Delfia" is a brand name for the hardened coconut fat. Wikipedia has descriptions in eight languages, and calls it "Hedgehog slice" in English. It seems like every language has its own names: I never heard any of the eight(!) Swedish names, the Danish, English or German names before.
We make it with unsweetened dark chocolate rather than milk chocolate, and we decorate it with jelly tops and sometimes walnuts, dried fruits and marzipan; some people put these things into the chocolate as well. We often add coffee as well. The amount of biscuits can change considerably. Some make it with 2-3 layers, three quarters of the volume is chocolate. Others make it with so much biscuit that the chocolate essentially serves as a glue between the layers. With unsweetened chocolate, a fair amount of biscuits and fruits it isn't that unhealthy (but don't overeat!).
Delfiakake was well established as a traditional Christmas cake in my childhood, in the 1960s. I wouldn't be surprised if it was made several decennies earlier.
|
|
|
|