Accessing a property then a method
Hi
Ive seen it time and time again whereby an instance property member of a class is accessed followed by an instance method, all of the same line.
For example given this source code:-
var doc = XDocument.Load("aUrlReferencingaXMLDoc");
foreach(var item in doc.Root.Elements())
What I would like to know is how is this possible to access the Elements method straight from the Root property? is is because they both have the same Return type, in this case XElement?
Regards
Steven