Urgent interview related question

Hi all
Sorry for the abrupt and very newbie nature of this question but i need help please, coming from a C# background the following (very simple) lines of code have left me a very confused!

1
2
3
  date    dtcodate = GetKeyObject().CODate;
  date    dtjoined = GetKeyObject().GetDateJoinedSch();
  string  szcoflag = GetSchemeParameter("Contracted Out");


Obviously these variables of type date & string are being declared and assigned values, but take for example the first line "date dtcodate = GetKeyObject().CODate;" is this saying that the variable dtcodate is going to be assigned the value of the CODate property that belongs to the GetKeyObject "object"? Because the way im seeing this is that GetKeyObject is a function (because of the empty parantheses), so how can it have a property?

Feel free to dumb down the answers!
It's saying that dtcodate will be assigned the value of the CODate data member of the object that is returned by the GetKeyObject() function.
Last edited on
Because the way im seeing this is that GetKeyObject is a function (because of the empty parantheses), so how can it have a property?

Can a function return a value?
Can a value be an object?
Ahh i see!
Many thanks Mikeyboy!
Topic archived. No new replies allowed.