问题描述
我得到一个包含 Guid 和字符串的值列表。但我只需要 Guids 并且必须用默认的 guid 值替换字符串值。你能建议怎么做吗?
var Value=abc.where(n=>n.userId).select(n=>n.userId);
谢谢
解决方法
我想您有一个 onAlive()
想要在 Guid 列表中进行转换。
如果是这种情况,答案很简单
BaseFragment
如果您不想要无效的 guid,那么
private fun destroyThem(){
}
override fun onDestroy() {
destroyThem() // it is ok to run
super.onDestroy()
}
override fun onCreate(savedInstanceState: Bundle?) {
destroyThem() // do not allow them to run
super.onCreate(savedInstanceState)
}