« first day (437 days earlier)      last day (2680 days later) » 

4:02 PM
let's burn down the queue tonight?
 
@QPaysTaxes That's kind of the point of tests though
If you can't rely on tests, what can you rely on?
 
@QPaysTaxes it will return the type AFAIK
 
@QPaysTaxes I have, but the typing system in C# is very well defined
I can't imagine that being an undefined behavior or an edge case
So your test should be valid...
 
@QPaysTaxes it will return the runtimetype for you
@QPaysTaxes return a as T; but you'll return null if a isn't a T or none of the types in the type hierarchy are assignable to T
@QPaysTaxes I don't think you can unless you hand me a full example. Maybe we should take this to Ministry to not clutter the transcript here
@QPaysTaxes if you have no contraints defined that is possible.
Np
ola
25 messages moved from SO Close Vote Reviewers
What are valid conversions then?
You have to provide how your implementation is going to construct that type
You can't create a type out of thin air
And you have logic that creates that T for you, right?
something like StreamReader.ReadLong();
 
4:34 PM
@Tuna I like Coursera, but boy is downloading sbt each time I want to submit an assignment boring.
 
You can create a T either by calling new(), set it to default() or have a member that returns T
magic
 
 
5:19 PM
 
 
3 hours later…
user4639281
11:25 PM
 

« first day (437 days earlier)      last day (2680 days later) »