True. it's a compiler bug that will probably never get patched: github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/Static%20Type%20Constraints.md
Yep :) it's a compiler bug that will probably never get patched: github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/Static%20Type%20Constraints.md
Dynamic - The equivalent of telling the compiler to shut up and trust you.
dangerous workaround.
True. it's a compiler bug that will probably never get patched:
github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/Static%20Type%20Constraints.md
I think this now got fixed
I wonder why this doesn't compile either.
using System;
public class Program
{
public static void Main()
{
Console.WriteLine(1 / 0);
}
}
Division by a constant that is Zero.
But fear not I have a solution for you:
Console.WriteLine(1 / (dynamic)0);
@@LevelUppp This even works. But you should wrap it in a method with the [DoesNotReturn] attribute and call it UncancelableDeadlock() xD
Dynamic... yuck.
Yep :)
it's a compiler bug that will probably never get patched:
github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/Static%20Type%20Constraints.md
clantz U should use dynamic with the Expando class. Too much fun.
@@rmcgraw7943 I wouldn't call dynamic typing fun..! I shudder at the mere thought of python and js.
clantz that’s kind of what I was getting at. Fun as in ICK!