你能在你的设置文件中有一个通用的 List(of T) 吗? [英] Can you have a generic List(of T) in your settings file?
本文介绍了你能在你的设置文件中有一个通用的 List(of T) 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的设置文件中,我想要一个 List(Myclass)类型的设置....我在网上找不到任何可以执行此操作的设置.可能吗?
In my settings file, I would like to have one setting that is of the type List(of Myclass).... I can't find anything on the net that does this. Is it possible?
推荐答案
我假设您在谈论用户设置...
I assume you're talking about user settings...
我不知道您是否可以指定泛型类型,但如果您创建自己的继承自 List(of MyClass) 的非泛型类型,那么您可以毫无问题地将此类型指定为您的用户设置.
I don't know if you can specify a generic type, although if you create your own non-generic type which inherits from List(of MyClass), then you can specify this type as your user setting without any problem.
类似于:
Public Class MyClassList
Inherits List(Of MyClass)
End Class
然后您应该可以浏览 MyClassList .
Then you should be able to browse for MyClassList .
这篇关于你能在你的设置文件中有一个通用的 List(of T) 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文