如果我在库中定义了一个辅助类,但我不想在库外部使用它,那么在类名前面放置下划线的正确隐藏机制是否正确?
part of foo;
class Bar { } // made available to users of the foo library
class _BarHelp { } // hidden from users of the foo library
Run Code Online (Sandbox Code Playgroud)
或者是否有其他隐藏 BarHelp 的方法?
| 归档时间: |
|
| 查看次数: |
502 次 |
| 最近记录: |