Side effects not valid during expression evaluation in this context
Statements that change the state of an object are not allowed in this context.
Error ID: BC30700
To correct this error
- Change your code so that statements are evaluated without changing the state of other items.