How to assign value to a constant or static class property
5 ビュー (過去 30 日間)
古いコメントを表示
I wrote a test code to set a Static property (Constant, as recommended) in MyClass, as TestStatic. In TestStatic I call a static method in MyClass, setA(), to change the value of one of the constant properties. When I stop then pass over the line
MyClass.m_a = aNewA;
I can see that the variable changed value. But after I step out from the function setA(), the value returned to the default.
May I ask what I did run and what should be the fix?
In the test code, the program should start from TestStatic.
Thanks.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!