从Windows应用程序访问类文件时实现Singleton概念 [英] Implementing Singleton concept when accessing a class file from windows application

查看:55
本文介绍了从Windows应用程序访问类文件时实现Singleton概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个名为"form1"&的Windows窗体. 4个名为.I的类文件.我在类文件中有一个方法.我需要通过实现单例概念来从"form1"访问类文件中的方法.任何人都可以指导我.我读了几篇有关单例模式的文章.但是我无法清楚地了解....

问候
Aabidha

Hi Guys,
I have a windows form named "form1" & 4 class files named .I have a method in the class files. I need to access the method in class files from "form1" by implementing singleton concept.can anyone guide me.I read few articles of singleton pattern.But I cannot get a clear picture....

Regards
Aabidha

推荐答案

不确定为什么要使用4个类.请看下面的链接,该链接具有有关Singleton的非常简单的描述.

http://msdn.microsoft.com/en-us/library/ff650316.aspx [ ^ ]
Not sure why you are using 4 Classes. Have a look at below link which has very simple description about Singleton.

http://msdn.microsoft.com/en-us/library/ff650316.aspx[^]


这篇关于从Windows应用程序访问类文件时实现Singleton概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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