Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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# ¿É·ÃÎÊÐÔÔ¼Êø

C# ÓïÑÔÖеÄÓÐЩ¹¹ÔìÒªÇóij¸öÀàÐÍÖÁÉÙÓëij¸ö³ÉÔ±»òÆäËûÀàÐ;ßÓÐͬÑùµÄ¿É·ÃÎÊÐÔ (at least as accessible as)¡£Èç¹û T µÄ¿É·ÃÎÊÓòÊÇ M ¿É·ÃÎÊÓòµÄ³¬¼¯£¬ÎÒÃǾÍ˵ÀàÐÍ T ÖÁÉÙÓë³ÉÔ±»òÀàÐÍ M ¾ßÓÐͬÑùµÄ¿É·ÃÎÊÐÔ¡£»»ÑÔÖ®£¬Èç¹û T ÔÚ¿É·ÃÎÊ M µÄËùÓÐÉÏÏÂÎÄÖж¼ÊǿɷÃÎʵģ¬Ôò T ÖÁÉÙÓë M ¾ßÓÐͬÑùµÄ¿É·ÃÎÊÐÔ¡£
´æÔÚÏÂÁпɷÃÎÊÐ ......

dz̸C#·ºÐ͵ÄÓô¦

ΪʲôҪʹÓÃC#·ºÐÍ?
ΪÁËÁ˽âÕâ¸öÎÊÌ⣬ÎÒÃÇÏÈ¿´ÏÂÃæµÄ´úÂ룬´úÂëÊ¡ÂÔÁËһЩÄÚÈÝ£¬µ«¹¦ÄÜÊÇʵÏÖÒ»¸öÕ»£¬Õâ¸öÕ»Ö»ÄÜ´¦ÀíintÊý¾ÝÀàÐÍ£º
public class Stack
    {
        private int[] m_item;
        public ......

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

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


#region ϵͳ¹ÜÀíÄ£¿éµÄö¾ÙÐÅÏ¢
/// <summary>
/// ÔÚÏß²»Á¼Åâ³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ