Re: Newbie Q: Explain: string Name = dept.FindChairperson().Name



This method returns object with property Name

HTH
Alex

"Rex" <RexForum4453@xxxxxxxxxxxxxxxxxx> wrote in message
news:iima63pouvcch63c36mj27pcikcbhangm9@xxxxxxxxxx
Hi All,
Quick newbie question: I am NOT looking for some code solution - I am
simply looking for an explanation. In a passing bit of code in a C#
book I have, I saw the following line:

string Name = dept.FindChairperson().Name

I AM pretty much getting C# and its various syntaxes, but I had not
seen this before. Here's my question: It is clear that
"FindChairperson" is a method within the dept object. But then
how is ".Name" somehow subservient to the method? In other words,
I think of a class as having methods and properties... but how is it
that they are somehow COMBINED here?

Thanks much,

Rex



.



Relevant Pages