You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Andreas Gullberg Larsen edited this page Feb 25, 2019
·
7 revisions
There is a large number of operator overloads, to facilitate strongly typed computations such as Speed speed = Length.FromMeters(100) / TimeSpan.FromSeconds(9);.
Put operator overload in Length.extra.cs if the first parameter is Length
Add a short xmldoc summary as per the example below. You can add more descriptions if it is useful.
The reason is to have a consistent place to find the operator overloads and the compiler complains if the containing type/file does not match any of the parameters of the operator overload method.