Re: Newbie Q: Explain: string Name = dept.FindChairperson().Name
- From: "Christof Nordiek" <cn@xxxxxxxxx>
- Date: Tue, 5 Jun 2007 14:59:46 +0200
"Rex" <RexForum4453@xxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
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?
The return type of FindChairperson has a property Name of type string (or a
type that is implicitly convertible to string).
I suppose it is a class representing in person and Name is the name of that
person.
To know more, you have to look at the definition resp. documentation of the
type of dept. Maybe the intellisense tells you more.
hth
Christof
.
- References:
- Prev by Date: Re: compare two structs via ==
- Next by Date: Re: Newbie Q: Explain: string Name = dept.FindChairperson().Name
- Previous by thread: Re: Newbie Q: Explain: string Name = dept.FindChairperson().Name
- Next by thread: Re: Newbie Q: Explain: string Name = dept.FindChairperson().Name
- Index(es):
Relevant Pages
|