Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Method(IInterface obj) {
- return obj.Calc();
- }
- public struct S1 : IInterface {…}
- public struct S2 : IInterface {…}
- void Update() {
- Method(new S1());
- …
- Method(new S2());
- }
- interface IInterface {
- int Calc();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement