|
Hi James,
If you look at the diff here ( as one example )...
https://github.com/JamesNK/Newtonsoft.Json/pull/15/files#diff-12
The original code looks like this...
if (contract.UnderlyingType.IsInterface() || contract.UnderlyingType.IsAbstract())
How is IsInterface() a property rather than an method call?
Does the Microsoft compiler treats both like properties? How does it know when its a method call instead?
That is why in my pull request the above became...
if (contract.UnderlyingType.IsInterface || contract.UnderlyingType.IsAbstract)
This, to me, is clearer that these are properties rather than methods.
I'm just curious how the 2 compilers treat methods and properties differently.
Note, I don't have access to a Windows box right now, hence why I can't confirm this property/method conundrum.
D.
|