随笔分类 - c#
摘要:namespace ConsoleApplication1 { public class Program { private ITestA A; public Program(ITestA B) { A = B; } static void Main(string[] args) { //TestA
        阅读全文
            
摘要:using Model; using System.Collections.Generic; using System.Text; public class Class1 { #region 生成Model类 public void testff() { #region 数据库ID所对应的类型值 Dictionary DicType ...
        阅读全文
            
摘要:using System.Collections.Generic; using System.Text; public class Class1 { //传递 1.表名 2.列名 3.类型 public void GenerateModel(string TableName, string ColumnName, string TypeName)...
        阅读全文
            
摘要:MessageBox.Show(true ? true ? "A" : "B" : "C"); MessageBox.Show(true ? "3" : "4");
        阅读全文
            
摘要:switch ("MySql") //选择语句 // case语句 成对 结束 执行到 第一个break { case "SqlServer2000": case "SqlServer2005": case "SqlServer2008": ...
        阅读全文
            
摘要:namespace test { using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; public class Form1 : Form // public partial class Form1 : Form ...
        阅读全文
            
摘要:using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // 有关程序集的一般信息由以下 // 控制。更改这些特性值可修改 // 与程序集关联的信息。 [assembly: AssemblyTitle("test")] //程序集标题 [as...
        阅读全文
            
摘要:C#的split函数分割 var words = strs.Split((string[])strlist, StringSplitOptions.RemoveEmptyEntries);
        阅读全文
            
摘要:#region 加载数据到DataGraidView private void button1_Click(object sender, EventArgs e) { string excelPath = textBox1.Text.Trim(); //string excelPath = "测试.xlsx"; /...
        阅读全文
            
摘要:dt = new DataTable(); dt.Columns.Add("a"); dt.Columns.Add("b"); dt.Rows.Add(1); object[] iis = new object[2]; iis[0] = 1; iis[1] = 2; dt.Rows.Add(iis)
        阅读全文
            
摘要:var filename = ""; //去掉扩展名 if (file.FileName.LastIndexOf(".") != -1) { filename = file.FileName.Substring(0, file.FileName.LastIndexOf(".")); } else {
        阅读全文
            
摘要:public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string str1,str
        阅读全文
            
摘要:public ActionResult Index() { #region 写入Cookies HttpCookie cookie = new HttpCookie("CookieName");//初使化并设置Cookie的名称 DateTime dt = DateTime.Now; //获取当前时间 ...
        阅读全文
            
摘要:private void button1_Click(object sender, EventArgs e) { int a = 6; int b = 66; Fun(ref a,ref b); //把a的地址和b的地址 传递过去 MessageBox.Show(a....
        阅读全文
            
摘要:// 分隔符号 // 功能 遍历html select 标签 中的键值对 加入到集合 //循环查找字符串并截取
        阅读全文
            
摘要:/// /// 增加一条数据 /// public int Add(string 表名,string 参数,string 参数值) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ")...
        阅读全文
            
摘要:private string GetGeneralContent(string strUrl) { string strMsg = string.Empty; try { WebRequest request = WebRequest.Create(strUrl); ...
        阅读全文
            
摘要://.方法一:采用OleDB读取EXCEL文件: //打开excel 返回指定表中的所有数据 public DataSet ExcelToDS(string Path) { string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + P...
        阅读全文
            
摘要://读取EXCEL public static DataSet LoadDataFromExcel(string filePath) //加载excel 返回DataSet内存数据库 { try { string strConn; strConn = "...
        阅读全文
            
 
                     
                    
                 
                    
                
 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号