Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

前端 未结 3 649
既然无缘
既然无缘 2020-12-19 10:25

I have this foreach section and i am trying to add a line after my \"result = string.Format\" but i get the following error \"Only assignment, call, increment, decrement, aw

3条回答
  •  粉色の甜心
    2020-12-19 11:10

    You have to do something with the result of your expression (e.g. assign it to result?!)

    For more information you should really format and tell us more about your code...SO users are not your personal compiler/debugger ;-)

提交回复
热议问题