public struct S1
{
public int MyProperty { get; set; }
public int MyProperty2 { get; set; }
}
public struct S2
{
public int MyProperty3 { get; set; }
public int MyProperty4 { get; set; }
}
I have two different structs namely S1,S2. Can someone add extension method without writing the metod for both of the structs? I mean I just want to write one-method and all structs will have this extension method. To me, since structs cannot be inherited by some special class, there is no solution. Any ideas, or do I think right- there is no way?