Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c#ʵÏÖÏÂÔØ´úÂëÊÕ¼¯

//TransmitFileʵÏÖÏÂÔØ
    protected void Button1_Click(object sender, EventArgs e)
    {
        /*
        Î¢ÈíΪResponse¶ÔÏóÌṩÁËÒ»¸öеķ½·¨TransmitFileÀ´½â¾öʹÓÃResponse.BinaryWrite
        ÏÂÔس¬¹ý400mbµÄÎļþʱµ¼ÖÂAspnet_wp.exe½ø³Ì»ØÊÕ¶øÎÞ·¨³É¹¦ÏÂÔصÄÎÊÌâ¡£
        ´úÂëÈçÏ£º
        */
        Response.ContentType = "application/x-zip-compressed";
        Response.AddHeader("Content-Disposition", "attachment;filename=z.zip");
        string filename = Server.MapPath("DownLoad/z.zip");
        Response.TransmitFile(filename);
    }
    //WriteFileʵÏÖÏÂÔØ
    protected void Button2_Click(object sender, EventArgs e)
    {
        /*
        using System.IO;
        */
        string fileName = "asd.txt";//¿Í»§¶Ë±£´æµÄÎļþÃû
        string filePath = Server.MapPath("DownLoad/aaa.txt");//·¾¶
        FileInfo fileInfo = new FileInfo(filePath);
        Response.Clear();
        Response.ClearContent();
        Response.ClearHeaders();
        Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
     


Ïà¹ØÎĵµ£º

c# Ö§³ÖXMLÐòÁл¯µÄ·ºÐÍ Dictionary

/// <summary>
/// Ö§³ÖXMLÐòÁл¯µÄ·ºÐÍ Dictionary
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
[XmlRoot("SerializableDictionary")]
public class SerializableDictionary<TKey, TValue& ......

c# enmu ö¾ÙС½á(1)

 
ö¾Ù
¡¡¡¡Ã¶¾ÙÀàÐÍÉùÃ÷Ϊһ×éÏà¹ØµÄ·ûºÅ³£Êý¶¨ÒåÁËÒ»¸öÀàÐÍÃû³Æ¡£Ã¶¾ÙÓÃÓÚ“¶àÏîÑ¡Ôñ”³¡ºÏ£¬¾ÍÊdzÌÐòÔËÐÐʱ´Ó±àÒëʱÒѾ­É趨µÄ¹Ì¶¨ÊýÄ¿µÄ“Ñ¡Ôñ”ÖÐ×ö³ö¾ö¶¨¡£
¡¡¡¡Ã¶¾ÙÀàÐÍ£¨Ò²³ÆΪö¾Ù£©Îª¶¨ÒåÒ»×é¿ÉÒÔ¸³¸ø±äÁ¿µÄÃüÃûÕûÊý³£Á¿ÌṩÁËÒ»ÖÖÓÐЧµÄ·½·¨¡£ÀýÈ磬¼ÙÉèÄú±ØÐ붨ÒåÒ»¸ö±äÁ¿£¬¸Ã±äÁ¿ ......

c# enmu ö¾ÙС½á(2)×Ô¼ºµÄ

ͨ¹ý·´É䣬µÃµ½Õë¶Ôijһö¾ÙÀàÐ͵ÄÃèÊö¡£
ö¾ÙµÄ¶¨ÒåÖмÓÈëÃèÊö
  using System;
using System.Collections;
namespace Ahnlab.ApplicationServices
{
public sealed partial class SysEnums
{


#region ϵͳ¹ÜÀíÄ£¿éµÄö¾ÙÐÅÏ¢
/// <summary>
/// ÔÚÏß²»Á¼Åâ³ ......

Ìá¸ßC#±à³ÌˮƽµÄ50¸öÒª¾÷


ÏëÌá¸ßc#±à³Ìˮƽ£¿ÏÂÃæÕâ50Ìõ¾­Ñé²»¿É²»¶Á£¡
Ìá¸ßC#±à³ÌˮƽµÄ50¸öÒªµã
1.×ÜÊÇÓÃÊôÐÔ (Property) À´´úÌæ¿É·ÃÎʵÄÊý¾Ý³ÉÔ±
2.ÔÚ  readonly ºÍ const Ö®¼ä£¬ÓÅÏÈʹÓà readonly
3.ÔÚ as ºÍ Ç¿ÖÆÀàÐÍת»»Ö®¼ä£¬ÓÅÏÈʹÓà as ²Ù×÷·û
4.ʹÓÃÌõ¼þÊôÐÔ (Conditional Attributes) À´´úÌæÌõ¼þ±àÒëÓï¾ä #if
5.×ÜÊÇΪ×Ô¶¨Ò ......

c#Ïß³Ì

c#ÖÐдһ¸ö¶àÏß³ÌÓ¦ÓÃÊǷdz£¼òµ¥µÄ£¬±¾Õ½«½éÉÜÈçºÎÔÚc#ÖÖ¿ª·¢¶àÏ̳߳ÌÐò¡£ÔÚ.netÖÐÏß³ÌÊÇÓÉSystem.Threading Ãû×Ö¿Õ¼äËù¶¨ÒåµÄ¡£ËùÒÔÄã±ØÐë°üº¬Õâ¸öÃû×ֿռ䡣
using System.Threading;
¿ªÊ¼Ò»¸öÏß³Ì
System.Threading Ãû×Ö¿Õ¼äµÄÏß³ÌÀàÃèÊöÁËÒ»¸öÏ̶߳ÔÏó£¬Í¨¹ýʹÓÃÀà¶ÔÏó£¬Äã¿ÉÒÔ´´½¨¡¢É¾³ý¡¢Í£Ö¹¼°»Ö¸´Ò»¸öÏ̡߳£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ