Two questions regarding the new records feature :
How do I recognize a record using reflection ? looking [here][1] maybe there is a way to detect the
EqualityContractbut I am not sure if that is the way to go ?Is it possible to have a generic constraint that a generic type is a record ? that is if it is possible to indicate that type parameter T must be a record class using a constraint ?
As pointed out here and here
Despite the above there are still scenarios where checking for record us useful. Some hackish ways to detect records which work ATM are:
EqualityContractproperty with theCompilerGeneratedattribute<Clone>$member as pointed out by @Yair Halberstadtor a combination of both
No