How do I shorten the path to a property?

  • A+
Category:Languages

For example if I have Object.ObjectTwo.Property and I don't want to clutter my code by writing that all the time, is there a way to make it shorter?

Instead of writing Object.ObjectTwo.Property = something, I would like to be able to write myVariable = something.

I couldn't find anything when I tried searching.

Edit: The member in question is a property.

 


Maybe just declare a separate variable?

var ObjectA = Object.ObjectTwo.Variable; 

Though while this is more convenient for you, on the computer side, it is one more declared variable.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: