Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specification


13 Conversions
13.4 User-defined conversions
13.4.1 Permitted user-defined conversions
Paragraph 11 C# permits only certain user-defined conversions to be declared. 2 In particular, it is not possible to redefine an already existing implicit or explicit conversion. 3 A class or struct is permitted to declare a conversion from a source type S to a target type T only if all of the following are true: - 4 S and T are different types.
- 5 Either S or T is the class or struct type in which the operator declaration takes place.
- 6 Neither S nor T is object or an interface-type.
- 7 T is not a base class of S, and S is not a base class of T.
Paragraph 21 The restrictions that apply to user-defined conversions are discussed further in §17.9.3. |
Jagger Software Ltd |
Company # 4070126 |
VAT # 762 5213 42 |

