I've encountered a really strange problem trying to access a decimal property
on an object that is returned from a cmdlet I've built.
If I print out the object to the console, it shows all the members populated
and correct. However, if I try and access a property using the ".", it
returns nothing.
e.g.
$myObject = my-cmdlett
$myObject # prints out object details to console, everything correct.
$myObject.amount # returns nothing.
amount is a public property, is a decimal, and is populated with 10.0.
I've used "." all over my script to access properties and have had this
issue pop up quite often. Usually refactoring the code and just general trial
and error fixes the problem - but I'd really like to know why this happens,
especially as this time I don't seem to be able to solve it.
Anyone have an idea?
Thanks.


