private void Time(int i) { Stopwatch sw = new
Stopwatch(); sw.Start(); Thread.Sleep(i); s...
分类:
其他好文 时间:
2014-05-27 01:15:43
阅读次数:
342
类的定义class
Date//用class定义一个类{public://公有成员:内部和外部都可以访问 void SetDate(int y,int m, int d); int
IsLeapYear();//成员函数 void Print();private://私有成员:内部...
分类:
其他好文 时间:
2014-05-27 01:06:01
阅读次数:
280
单例模式:
单例模式又称职责模式;简单的说,一个对象(在学习设计模式之前,需要比较了解面向对象思想)只负责一个特定的任务;单例类:1、构造函数需要标记为private(访问控制:防止外部代码使用new操作符创建对象),单例类不能在其他类中实例化,只能被其自身实例化;2、拥有一个保存类的实例的静态成员...
分类:
Web程序 时间:
2014-05-24 04:25:10
阅读次数:
292
1. 标签处理类 1 public class MyReferer extends
BodyTagSupport { 2 private String site; 3 private String back; 4 public String
getSite() { 5 ...
分类:
其他好文 时间:
2014-05-24 03:54:31
阅读次数:
252
内容来源于开发者社区。用到的代码如下:using UnityEngine;using
System.Collections;using System;public class ClockAnimator : MonoBehaviour{
private const float h...
分类:
其他好文 时间:
2014-05-24 00:47:44
阅读次数:
308
面向对象的三大特点:1:封装。2:继承。3:多态,对于多态在PHP当中不是那么的好介绍,只需要记住是运行时加载就行了!对象的几个语句的意思;1:public在对象中是公开访问的,2:private在对象中是不能访问他的内容,保密状态3:protected:户类和内部访问;4:——construct初...
分类:
Web程序 时间:
2014-05-24 00:44:37
阅读次数:
431
private static string CmdPing(string strIp){Process
p = new Process(); p.StartInfo.FileName =
"cmd.exe";//设定程序名p.StartInfo.UseShellExecute = false; //...
分类:
其他好文 时间:
2014-05-24 00:42:36
阅读次数:
481
private void dataGridViewX1_CellPainting(object
sender, DataGridViewCellPaintingEventArgs e){ if (e.RowIndex >= 0 &&
e.ColumnIndex>=0) { ...
如果通过网络加载了一张位图,想拿到这张位图的Bitmap,有两种办法,至于那种好,可能要看是在什么情况下了1,根据已有的Drawable创建一个新的Bitmap:private
Bitmap bitmap;private void drawableToBitamp(Drawable drawable...
分类:
其他好文 时间:
2014-05-23 11:04:39
阅读次数:
323
It is not possible using the .NET BCL. However if
you really want it you can use native SetCursorPos inUser32.dll.
[DllImport("User32.dll")]private st...
分类:
其他好文 时间:
2014-05-23 10:16:34
阅读次数:
236