Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class A
- {
- public int AA;
- public int AB;
- public static implicit operator A(B v)
- {
- A obj = new A
- {
- AA = (A)v.BA,
- AB = 0
- };
- return obj;
- }
- public static explicit operator B(A v)
- {
- B obj = new B
- {
- BA = (B)v.AA
- };
- return obj;
- }
- }
- public class B
- {
- public int BA;
- }
Add Comment
Please, Sign In to add comment