c# Programming Glossary: typesafe
How can I use interface as a C# generic type constraint? http://stackoverflow.com/questions/1096568/how-can-i-use-interface-as-a-c-sharp-generic-type-constraint checking in the function itself but this seemed alot more typesafe and I suppose a little more performant since all the checks..
How to make Databinding type safe and support refactoring http://stackoverflow.com/questions/1329138/how-to-make-databinding-type-safe-and-support-refactoring I have now found workarounds for nameof operator in C# typesafe databinding that also has a good starting point for a solution...
Why does C# (4.0) not allow co- and contravariance in generic class types? http://stackoverflow.com/questions/2541467/why-does-c-sharp-4-0-not-allow-co-and-contravariance-in-generic-class-types to come up with other scenarios that permit variance in a typesafe manner. If you have such a scenario I'd love to see it. That..
Why isn't there generic variance for classes in C# 4.0? http://stackoverflow.com/questions/2733346/why-isnt-there-generic-variance-for-classes-in-c-sharp-4-0 out just fine There's no reason why this couldn't be typesafe. An operation which would violate type safety on a mutable data..
Storing a reference to an object in C# http://stackoverflow.com/questions/2760087/storing-a-reference-to-an-object-in-c-sharp you could do that the operation you are describing is not typesafe for a different reason. You have a very badly named field variable..
workarounds for nameof() operator in C#: typesafe databinding http://stackoverflow.com/questions/301809/workarounds-for-nameof-operator-in-c-typesafe-databinding for nameof operator in C# typesafe databinding There's been a lot of wishes to include nameof.. need names of properties as strings then. And I want them typesafe. I remember there was a workaround for .NET 3.5 which involved..
Why does this generic constraint compile when it seems to have a circular reference http://stackoverflow.com/questions/3783321/why-does-this-generic-constraint-compile-when-it-seems-to-have-a-circular-refere IEnumerable Cat newFriends ... Unfortunately that's not typesafe either Animal animal new Cat animal.MakeFriends new Animal new..
Why was IEnumerable<T> made covariant in C# 4? http://stackoverflow.com/questions/6732299/why-was-ienumerablet-made-covariant-in-c-sharp-4 the compiler only allows variance when it is known to be typesafe. However it does preserve the broken array variance problem...
Best practices for using and persisting enums http://stackoverflow.com/questions/746812/best-practices-for-using-and-persisting-enums type at least in Java and C# or using something like the typesafe enum pattern . Using plain constants Integer or similar is discouraged..
|