你可以有(的T)在你的设置文件中的泛型列表? [英] Can you have a generic List(of T) in your settings file?

查看:156
本文介绍了你可以有(的T)在你的设置文件中的泛型列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的设置文件,我想有一个设置是这样的类型列表(的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...

我不知道,如果你可以指定一个泛型类型,但如果你创建自己的非泛型类型,它继承名单(对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 .

这篇关于你可以有(的T)在你的设置文件中的泛型列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆