hello

12 2012 档案

摘要:见下列代码: static void Main(string[] args) { int[,] a = new int[,] { { 0, 1, 2, 3 }, { 2, 3, 4, 5 }, { 3, 4, 5, 6 } }; Console.WriteLine("规则数组:"); Console.WriteLine(a.Length); Console.WriteLine(a.GetLength(0)); Console.WriteLine(a.GetL... 阅读全文
posted @ 2012-12-13 16:31 B追风少年 阅读(3105) 评论(0) 推荐(0)
摘要:winfrom导入excel内容,要求能够excel中多个工作簿的内容。代码如下:#region 导入excel数据 private void button2_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "表格文件 (*.xls)|*.xls"; openFileDialog.RestoreDirectory = t... 阅读全文
posted @ 2012-12-13 14:48 B追风少年 阅读(9965) 评论(0) 推荐(0)
摘要:Java中的string拥有CharAt()方法,C#是不拥有的,为了使用方便,我们自己可以写一个。using System; namespace Company{ public class TestMain{ static void Main(){ string str = "abcdefg"; string n_str = str.CharAt(3); Console.WriteLine(n_str); } } public static class... 阅读全文
posted @ 2012-12-10 13:32 B追风少年 阅读(7055) 评论(0) 推荐(0)
摘要:考虑到很多数据源是不确定的,所以这时无法在前台设置gridview的表头,需要在后台动态指定并绑定数据。前台代码如下:<%@ Page Title="主页" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><asp:Content ID="HeaderContent 阅读全文
posted @ 2012-12-06 17:18 B追风少年 阅读(11224) 评论(4) 推荐(0)

hello too