Hi is there any workaround on creating a class that has both struct and string as a generic constraint?
public class AutoEncryptor<T> where T : struct, string {
{
private T? _value;
// codes removed for brevity
}
My goal is to save myself from the hassle of creating duplicate methods with the same structure but the difference is, the other one accepts a string and the other one accepts struct (value types).