I want to make a generic class that accepts only serializable classes, can it be done with the where constraint?
The concept I'm looking for is this:
public class MyClass<T> where T : //[is serializable/has the serializable attribute]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…