Scott MacMaster
March 26th, 2003, 12:11 AM
Does anyone understand this compiler error message?
"Cannot modify the return value of 'expression' because it is not a variable."
It is in reference a line like this:
anObject.AProperty.AnotherProperty = something;
Both properties returns objects not simple data types so it should be returning references not values, right? It it doesn't return references then even something like this, anObject.AProperty = something, won't work. The information about this error message gives an example that resembles numerous lines of code I've written. However, all but this one line of code compiles and works fine.
Well, back to my original question, does anyone understand this error message and know what could cause it?
Thanks
"Cannot modify the return value of 'expression' because it is not a variable."
It is in reference a line like this:
anObject.AProperty.AnotherProperty = something;
Both properties returns objects not simple data types so it should be returning references not values, right? It it doesn't return references then even something like this, anObject.AProperty = something, won't work. The information about this error message gives an example that resembles numerous lines of code I've written. However, all but this one line of code compiles and works fine.
Well, back to my original question, does anyone understand this error message and know what could cause it?
Thanks