MuffinMan
MuffinMan
CC#
Created by MuffinMan on 5/17/2023 in #help
✅ 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.
10 replies