| « | December 2025 | » | | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | | |
|
| 公告 |
Back Today!
Hold on~
Come on~ |
| 统计 |
blog名称:执著 日志总数:39 评论数量:43 留言数量:0 访问次数:247421 建立时间:2005年3月4日 | |
[.net]ini文件操作 |
执著 发表于 2005/4/11 13:17:13 |
using System; using System.IO; using System.Runtime.InteropServices; using System.Text;
public class inifile { public string Path; [DllImport("kernel32")] private static extern long WritePrivateProfileString(string section,string key,string val,string filePath); [DllImport("kernel32")] private static extern int GetPrivateProfileString(string section,string key,string def,StringBuilder re | |
|
|
[.net]遍历目录下的所有文件 |
private void button1_Click(object sender, System.EventArgs e) { folderBrowserDialog1.ShowDialog(); if (folderBrowserDialog1.SelectedPath !="") { StringCollection sc =getallfiles(folderBrowserDialog1.SelectedPath);
for(int i = 0;i<sc.Count;i++) { MessageBox.Show(sc[i]);//得到所有的文件名
&nbs | |
|
|
[.net]datagrid里面checkbox的用法 |
private void Button1_Click(object sender, System.EventArgs e) { CheckBox c1;// = new CheckBox(); for(int i =0;i<dg1.Items.Count;i++) { c1 =(CheckBox)dg1.Items[i].FindControl("CheckBox1"); if(c1.Checked && c1 !=null) { Label1.Text = Label1.Text +dg1.Items[i].Cells[1].Text; | |
|
|
|
|
|