自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 索引器

CLR(公共语言运行时)提供了两种属性:无参属性和含参属性,在C#中,前者通常被称为属性(property), 后者被称为索引器(indexer)。定义索引器的方式如下:[修饰符] 数据类型 this[索引类型 index]{get{//返回属性的代码};set{//获得属性的代码};}属性:[修饰符] 数据类型 属性名{get{};se

2014-04-01 10:33:32 437

原创 文件资源管理器及二进制

1.#region 文件的读取//递归        private void Form1_Load(object sender, EventArgs e)        {            Getnode();        }        private void Getnode()        {            //获取F盘中的txt文件  当前

2014-03-28 14:48:26 496

原创 序列化与发序列化

1.序列化与反序列化都用的是相同的BinaryFormatter bf=new BinaryFormatter()2. 使用 流 的方式FileStream fs=new FileStream("序列化内容路径(一般为本地bin--debug文件中)(类名.bin)",FileMode.OpenOrCreate)3.序列化:bf.Serialize(流对象,建立的类的对象)  反序

2014-03-28 14:18:50 449

原创 字符串的处理

1.字符串的三大特性:1),不可变性(字符串本身不会改变,变的只是副本)字符串常量不可变,只在内容中重新生成空间,将变量指向新生成的内容实例:1.string str="abcd";str.ToUpper();  //需要有返回值来接Console.Write(str);  //输出的是abcdstr=str.ToUpper();Console.Write(str);

2014-03-10 19:03:49 498

原创 arraylist,list,Dictionary

1.使用相对较多的属性和方法:1),count属性和capacity属性Count属性是目前ArrayList包含的元素的数量,这个属性是只读的。Capacity属性是目前ArrayList能够包含的最大数量,可以手动的设置这个属性,但是当设置为小于Count值的时候会引发一个异常实例1:随机抽取数据,并且是不重复的偶数ArrayList array = new Array

2014-03-06 18:00:55 490

原创 GridView

//获取GridView中学生的出勤情况,并且保存到数据库        protected void btnCall_Click(object sender, EventArgs e)        {            string state = "";            string sname = "";            for (int i = 0;

2014-03-03 20:03:06 460

原创 定时跳转

$(function () {                function jump(count) {                    window.setTimeout(function () {                        count--;                        if (count > 0) {             

2014-01-09 15:04:39 403

原创 MD5及邮件发送

public static string GetMD5(string sDataIn)        {            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();            byte[] bytValue, bytHash;            bytValue = System

2014-01-08 10:17:55 891

原创 ajax链接数据库 分页

前台:                    table tr td, th {            border: 1px solid black;        }        /*table {            border:1px solid black;        }*/                    $(

2013-12-26 16:57:24 464

原创 gridview分页

后台:/*private void divteacher() {            string sqlstr = ConfigurationManager.ConnectionStrings["sqlserver"].ConnectionString;            DataTable dt = new DataTable();            using (S

2013-12-18 08:37:05 496

原创 二级菜单绑定数据库

前台:利用repeater绑定                                    onitemdatabound="Repeater1_ItemDataBound">                                    '/>            '>                               

2013-12-17 20:16:48 712

原创 js基本语句

1.变量2.javascript运算符3.流程控制语句(1)if(condition表达式)...else  /if(condition表达式)....else if(2)swith :if...else适用于固定值的比较(3)do...while var i = 0;      do {      alert('满足条件')      i++;     

2013-12-08 13:22:41 433

原创 左右图片切换

#divleft {            float:left;            border:1px solid green;            width:200px;            height:200px;            margin-top:50px;        }        #divcenter {        fl

2013-12-05 15:22:59 489

原创 cookie自动登录,添加到购物车

cookie的读和写 protected void Page_Load(object sender, EventArgs e)        {            if (!IsPostBack)            {                if (Request.Cookies["username"] != null && Request.Cookies["p

2013-11-13 19:39:26 718

原创 FirstWeb连接数据库中的数据

作业:实现用户注册功能要求:1.注册内容包括:用户名,密码,姓名,地址,手机,出生年月,性别,邮箱2.注册时验证用户名是否存在3.出生年月日让用户选择,而不是手动输入前台 在浏览器中查看  (自己写)--将年月写死,用javascript可以实现年月http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

2013-10-08 19:58:57 494

原创 数据库的基础

表的建立,并插入数据create table T_Product(P_Id int primary key identity,p_Name varchar(32) not null)create table T_Order(O_Id int primary key identity,P_Id int not null,O_Numb int not null,

2013-09-25 14:19:11 414

原创 数据的导出与导入(数据库)

数据的导出  class Program    {        static void Main(string[] args)        {            string sqlserverstr = ConfigurationManager.ConnectionStrings["sqlserver"].ConnectionString;          

2013-09-18 17:02:18 450

翻译 Dictionary的用法

Dictionary常用用法:以 key 的类型为 int , value的类型为string 为例 1、创建及初始化 DictionarymyDictionary=newDictionary();  2、添加元素myDictionary.Add(1,"C#");myDictionary.Add(2,"C++");myDictionary.Add(3,"ASP.NE

2013-09-15 13:02:41 611

原创 登录查询学生信息

学生信息的登录查询涉及到数据库的连接和调用数据库中的数据 1.连接数据库,并且向数据库发送数据,接收返回的数据using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Lin

2013-09-08 15:32:37 641

原创 循环语句与条件语句

初次博客写不好请多关照:        今天的我认为最主要的就是循环语句,因为在以后的编程过程中循环式必不可少的,循环语句主要为:for,foreach,while,do while,各个的循环都有不同的用途,当然在循环语句当中条件语句也是不能缺少的,而 if 语句更是,我们随手就能用上的。         double money = 10000;

2013-09-04 17:41:27 608

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除