且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Windows窗体类中使用模板

更新时间:2023-12-06 09:44:58

中使用模板.您可以创建一个静态类,并将模板设为该类的公共数据成员.

You can create a static class and make your template a public data member of the class.

public TemplateList : IList<mytemplate>;

public static class Globals
{
    private static m_templates = new TemplayteList();
    public static Templates { get; private set;}
}</mytemplate>



现在,您可以在应用程序中的任何位置使用它.



Now, you can use it anywhere in your application.