Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readonly field 的值會因爲傳址/參考而改變 #103

Closed
ziteh opened this issue Jul 30, 2022 · 1 comment · Fixed by #105
Closed

readonly field 的值會因爲傳址/參考而改變 #103

ziteh opened this issue Jul 30, 2022 · 1 comment · Fixed by #105
Assignees
Labels
bug Something isn't working

Comments

@ziteh
Copy link
Member

ziteh commented Jul 30, 2022

描述

public static readonly double[] DescartesHomePosition = { 0, 368, 294, 180, 0, 90 };

嘗試改成 get only properties 而非 field。

重現步驟

讀其值後重新賦值。

備註

@ziteh ziteh added the bug Something isn't working label Jul 30, 2022
@ziteh ziteh self-assigned this Jul 30, 2022
@ziteh
Copy link
Member Author

ziteh commented Jul 30, 2022

使用 Array.Copy() method 以深層複製。

@ziteh ziteh mentioned this issue Jul 30, 2022
2 tasks
ziteh added a commit that referenced this issue Jul 30, 2022
@ziteh ziteh mentioned this issue Jul 30, 2022
2 tasks
ziteh added a commit that referenced this issue Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant