Let's say I have a few extension methods for "MyClass". My question is, what's the best practice to organize/store these methods? Should they be simply put into a "MyClassExtensions" Kotlin file?
我曾try 将这些方法封装在一个类中,但是在导入类之后,我似乎不知道如何使用/访问扩展方法.
编辑: 为澄清起见,我并不是要求帮助如何命名包含扩展方法的文件.我问的是存储/组织此类方法的最佳实践/方法.也就是说.应该简单地将它们放入Kotlin文件中,还是应该将它们封装在类中.我来自Java背景,所以我习惯于在类中存储内容.