✅ Is it possible to put a generic constraint on a record?
If I have a record Card<T> (....) and I want to put a constraint on it, such as where T : class? is there any way of doing this? The syntax does seem to be liked in my IDE (rider). All of the information I am trying to look up talks about the problem of making a constraint on T being a record, which is not even a thing.
6 Replies
Orannis#3333
REPL Result: Success
Compile: 477.853ms | Execution: 86.262ms | React with ❌ to remove this embed.
I was trying to use this with positional parameter syntax
I suppose that is not supported.
That's what I showed 🙂
oops
oh that is why I missed it
thanks!
You're welcome. Please $close if there's nothing else
Use the
/close
command to mark a forum thread as answered