I want to modify my constructor so that it only accepts objects that have the [Serializable] attribute. Here is my current constructor code:
public MyClass(object obj)
{
}
I want to change it to something like this:
public MyClass(? obj)
{
}
How can I accomplish this in C#?