c#danliemosih
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; namespace 打印机
{
public class print
{
private static print instace = null;
static object ce=new object();
public static print Instace
{
get
{
if (instace == null)
{
lock(ce)
{
if(instace==null)
{
instace = new print();
Console.WriteLine("测试");
}
}
}
return instace;
}
}
public void prints(object msg)
{
string x = (string)msg;
Console.WriteLine(x);
} } }
c#danliemosih的更多相关文章
随机推荐
- 安装GRID时跑root.sh脚本报错(ORA-27091: unable to queue I/O)
在安装GRID过程中,运行root.sh脚本时报如下信息: Adding Clusterware entries to upstart CRS-2672: Attempting to start 'o ...
- HashedWheelTimer
HashedWheelTimer 是根据 Hashed and Hierarchical Timing Wheels: Data Structuresfor the Efficient Impleme ...
- Dive into python 实例学python (1) —— 函数和测试
odbchelper.py def buildConnectionString(params): """Build a connection string from a ...
- WebService之Axis2 后续(6)~(10)目录
WebService大讲堂之Axis2(6):跨服务会话(Session)管理 WebService大讲堂之Axis2(7):将Spring的装配JavaBean发布成WebService WebSe ...
- 当数据库某张表数据发生变化时,更新c#程序中缓存的用法
参考:http://www.webkaka.com/tutorial/asp.net/2012/111912/(SqlDependency和SqlCacheDependency缓存的用法及具体步骤) ...
- node.js npm权限问题try running this command again as root/Administrator.
npm install报错; try running this command again as root/Administrator. 以管理员身份打开cmd 开始菜单->所有程序->附 ...
- C++Primer 第七章
//1.定义在类内部的函数是隐式内联的. //2.默认情况下,this指针的类型是指向类类型非常量版本的常量指针.对于类的常量成员函数的声明方法是:将const放置于成员函数的参数列表后,用于修饰th ...
- Leetcode: Alien Dictionary && Summary: Topological Sort
There is a new alien language which uses the latin alphabet. However, the order among letters are un ...
- topsort
top排序每次入队的是限制情况为0的... 就可以直接记录了,每次出队的就也是为0的,出队结果对每个子节点或者被限制节点,的限制条件-1 然后再判断有没有后继有没有为0的,有就入队! 出入队一次,找后 ...
- android与后台请求的例子
public static ClientResponse SendClientRequest(List<BasicNameValuePair> params){ ClientRespons ...