How to assign value to a constant or static class property
6 次查看(过去 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!