On Saturday, 24 February 2018 at 03:43:25 UTC, Jonathan M Davis wrote:
That does not do what the OP requested at all. That tests whether T is one of byte, ubyte, short, ushort, int, uint, long, and ulong, whereas what the OP wants is to test whether T can be cast to int.

- Jonathan M Davis

yeah. I realised that after I had posted.

I posted a more suitable response after that though (I hope), with the intention of leading the OP away from an explicit cast, towards an implicit cast.

Reply via email to