TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
357
121.1k
Accessing a property then a method
Jul 12 2012 10:47 AM
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
Reply
Answers (
5
)
validate because of user purpose
I am working in Metro Apps in Windows 8. I have to create multiple instances of single Metro app. Is this possible in Metro app?