How fast is getting a property?

Hi, i would like to know if getting the value of a property, for example: state.Amno , is as fast as reading a value or Bolt has some code behind to lock or something like that.

Because if not, i should copy them to local variables to use it.

Thanks

Comments

  • DirtyHippy
    DirtyHippy ✭✭
    edited February 2017
    In BoltCore it looks like it is directly accessed via an indirection through an array of state properties. I don't see any logic beyond that being executed so I would say it is ok to use it without storing a local first. That being said, there is additional logic is in the generated dll so I would just ILSpy it and see what it does there - it might do something on top of that.