随笔分类 - Program
摘要:public class PP { public string a { get; set; } public string b { get; set; } public string c { get; set; } } class Program { static void Main(string[...
        阅读全文
            
                posted @ 2018-07-24 15:54  
blog_yuan
    
            
        
摘要:处理Linux时间戳 一步提交的处理事项
        阅读全文
            
摘要:using System.Text;using System;using System.Net.Mail;using System.Net;using System.IO;namespace MailDemo{ public static void CreateCopyMessage(string server) { MailAddress from = new MailAddress("yuanyuncai_2010@163.com", "Ben Miller"); MailAddress to = new MailAddress("zhic
        阅读全文
            
摘要:服务器端: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net.Sockets;using System.Net;namespace Server{ cl
        阅读全文
            
摘要:TripleDES.Mode:获取或设置对称算法的运算模式; CipherMode.CBC:指定用于加密的块密码模式 CBC 密码块链 (CBC) 模式引入了反馈。每个纯文本块在加密前,通过按位“异或”操作与前一个块的密码文本结合。这样确保了即使纯文本包含许多相同的块,这些块中的每一个也会加密为不同
        阅读全文
            
摘要:class Program { static void Main( string[ ] args ) { SumEx1( ); } class package { public string Company { get; set; } public double weight { get; set; } } public static void SumEx1( ) { List<package> pack = new List<package> { new package {Company = "aaa",weight=11.00}, new pac
        阅读全文
            
                posted @ 2012-08-19 02:27  
blog_yuan
    
            
        
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Practices.EnterpriseLibrary.Data;using System.Data.Common;namespace cnblog.DAL{ public class CnblogUserDal { public void CreateUser( string username, string password, string displayName, string email, s
        阅读全文
            
                posted @ 2012-08-10 02:29  
blog_yuan
    
            
        
摘要:class Program { //委托的参数个数和类型必须和委托穿的方法参数个数和类型必须保持一致 //申明委托的泛型参数 (T, U) 好处是不必关心要知道具体调用方法的参数类型 //在调用委托的时候,可以是任意类型的参数 public delegate T Del<T>( T sender )
        阅读全文
            
摘要://泛型结构可以作为参数传给方法 int[ ] arr = { 1, 2, 3, 4, 5, 6, 7, 8 };vod Work(ArraySegment<int> seg){ ArraySegment<int> seg = new ArraySegment<int>( arr, 2, 3 ); for ( int i = seg.Offset; i < seg.Offset+seg.Count+1; i++ ) { Console.WriteLine( seg.Array[i]); }}
        阅读全文
            
摘要:public class Person { //当 lhs> rhs的时候,就进行交换位置public void SwapIfGreater<T>( ref T lhs, ref T rhs ) where T : System.IComparable<T> { T temp; if ( lhs.CompareTo( rhs ) > 0 ) { temp = lhs; lhs = rhs; rhs = temp; } } }class Program { static void Main( string[ ] args ) { Person p = new 
        阅读全文
            
摘要:protected void Lbtn_Click( object sender, EventArgs e ) { string userName = this.TextUserName.Text; string userPwd = this.TextPwd.Text; userPwd = this.TextNPwd.Text; userTable = BLLuser.GetData( ); if ( userTable != null && userTable.Rows.Count >= 1 ) { if ( TextUserName.Text.Trim( ) == u
        阅读全文
            
摘要:protected void LinkButton1_Click( object sender, EventArgs e ) { string UserId = this.TextNumber.Text.Trim( ); string UserName = this.TextName.Text.Trim( ); string UserPwd = this.TextPwd.Text.Trim( ); string UserEmail = this.TextEmail.Text.Trim( ); object obj = BLLuser.GetData2( UserId );//加上select 
        阅读全文
            
摘要:namespace Console运算符重载{ /// <summary> /// 这种写法类似于集成的计算方式,比较专业 /// </summary> class Class1 { public int a; public int a1; public Class1(int c, int b ) { a = c; a1 = b; } //public Class1(double cc) //{ // a1 = cc; //} //说明:implicit 关键字隐式转换指定用在将 Class 类型转换成为 int 类型,换成 explicit 就会报错 //public
        阅读全文
            
摘要:using System.Web.Caching;namespace PetShop.ICacheDependency { /// <summary> /// This is the interface that the DependencyFactory (Factory Pattern) returns. /// Developers could implement this interface to add different types of Cache Dependency to Pet Shop. /// </summary> public interfac
        阅读全文
            
摘要:<?xml version="1.0"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><connectionStrings><!-- SQL connection string for Profile database --><add name="SQLProfileConnString" connectionString="CONFIG_SQL_PROFILE&qu
        阅读全文
            
摘要:<%@ OutputCacheLocation="Any" 输出缓存可以位于发出请求的客户端浏览器,代理服务器,处理请求的服务器,对应于HttpCacheability.publicLocation="Client" 输出缓存位于发出请求的客户端,对应于HttpCacheability.privateLocation="Downstream" 输出缓存可以存储在任何HTTP1.1 可缓存设备中,源服务器除外,这包裹代理服务器和发出的请求的客户端。Location="server" 输出缓存可以位于处理请求的 
        阅读全文
            
摘要:public static class CacheHelper{ public static System.Collections.Generic.List Products { get { HttpContext context = HttpContext.Current; List list ...
        阅读全文
            
摘要:public class CacheCD{ public static string GetMessageByCache//使用方法和属性都可以被HtmlEncode()传回去 { //HttpContext context = HttpContext.Current; get { //string message = context.Cache[ "Message" ] as string; string message = HttpRuntime.Cache[ "Message" ] as string; if ( message == null )
        阅读全文
            
摘要:protected void BtnSace_Click( object sender, EventArgs e ) { int cellCount = int.Parse( this.TextBox1.Text ); int rowCount = int.Parse( this.TextBox2.Text ); string data = this.TextBox3.Text; for ( int i = 0; i < rowCount; i++ ) { TableRow row = new TableRow( ); Table1.Rows.Add( row ); string inp
        阅读全文
            
                    
                
浙公网安备 33010602011771号