static void Main(string[] args) { int[]a= Read();//读数据 Sort(ref a);//排序 Write(a);//输出数据 }读数据 1 /// <summary> 2 /// 读数据 3 /// </summary> 4 /// <returns></returns> 5 public static int[] Read() 6 { 7 int i; 8 9 int[] a = new int[5];10 for (... Read More
posted @ 2012-02-27 09:44 木子易 Views(384) Comments(0) Diggs(0) Edit
Marquee标记用于在可用浏览区域中滚动文本。 格式: [MARQUEE ALIGN="…" BEHAVIOR="…" BGCOLOR="…" DIRECTION="…" HEIGHT="…" WIDTH="…" HSPACE="…" VSPACE="…" LOOP="…" SCROLLAMOUNT="…" SCROLLDELAY="…" ONMOUSEOUT=this.st Read More
posted @ 2012-02-26 17:05 木子易 Views(416) Comments(0) Diggs(0) Edit
///<summary>/// 上传图片///</summary>///<param name="FUSShopURL"& gt;FileUpload对象</param>///<param name="UpladURL">图片要放到的目录名称</param>///<returns>如果FileUpload不为空则返回上传后的图片位置,否则返回为空字符</returns>publicstaticstring uploadImage(FileUpload FUS Read More
posted @ 2012-02-25 13:30 木子易 Views(1429) Comments(0) Diggs(1) Edit
/// <summary> /// 上传文件 /// </summary> /// <param name="pf">HttpPostedFile</param> /// <param name="path">路径</param> /// <param name="filename">输出文件名</param> /// <returns>错误信息</returns> publicstaticstring Upload Read More
posted @ 2012-02-25 13:17 木子易 Views(208) Comments(0) Diggs(0) Edit
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Text;using System.Drawing;public pa Read More
posted @ 2012-02-25 13:13 木子易 Views(705) Comments(0) Diggs(0) Edit
enum week { Mon, Tue, Thre, Wend, Fir, Jan, Sun, } static void Main(string[] args) { week myweek = week.Mon; int myweek1=(int)myweek ; Console.WriteLine(myweek);//输出Mon Console.WriteLine(myweek1);//输出0 } Read More
posted @ 2012-02-23 15:19 木子易 Views(107) Comments(0) Diggs(0) Edit
static void Main(string[] args) { Console.WriteLine("请输入一个数a:");int a = Int32.Parse(Console.ReadLine());Console.WriteLine("请输入一个数b:");int b = Int32.Parse(Console.ReadLine());//第一种方法使用临时变量来实现两个数交换//int temp;//temp = a;//a = b;//b = temp;//第二种方法 不使用临时变量 使用两个数的和 实现两个数交换//a += b;//b Read More
posted @ 2012-02-23 10:32 木子易 Views(283) Comments(0) Diggs(0) Edit
/// <summary> /// 统计一串字符中每一个字符出现的次数 /// 用泛型和数组实现 /// </summary> /// <param name="number"></param> public static void Query(string number) {//定义一个键值分别是 字符和数值的字典 Dictionary<char, int> dic = new Dictionary<char, int>();//将输入的字符转换成字符数组 char[] num = number.To Read More
posted @ 2012-02-22 16:04 木子易 Views(194) Comments(0) Diggs(0) Edit
刚开始学习WinForm做项目第一个问题就是在登录的时候验证正确的时候关闭登录窗体 显示主窗体解决方法:方法1: 在主窗体中先定义一个login窗体 再用 login 实例化一个窗体 并让该窗体以对话框的形式显示, 根据DialogResult的值来判断是否关闭该登录窗体 判断之后在运行主窗体代码示例:主窗体代码:static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Login()); Log Read More
posted @ 2012-02-22 11:49 木子易 Views(3337) Comments(2) Diggs(2) Edit
<script type="text/javascript"> var xmlhttp; var _result="False"; function createXMLHttprequest() { if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } } function inDat Read More
posted @ 2012-02-15 11:44 木子易 Views(261) Comments(0) Diggs(0) Edit