• 大小: 0.03M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: C#  Queue  队列  编程  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace WindowsApplication3
{
    public partial class Form1 : Form
    {
        //该事例用于演示C#中队列的处理当声明一个队列后,开启一个线程监控此队列,当有消息时就立刻传送出去


        Thread th = null;               //用于监控队列,当有消息时就立刻传送出去
        Queue queueMsg = new Queue();   //用于存消息的队列


        public Form1()
        {
            InitializeComponent();

        }

        private void Form1_Load(object sender EventArgs e)
        {
            th = new Thread(sendMsg);
            th.Start();     //开始监控队列中的消息当有消息时就立刻传送出去
        }


        /// 

        /// 从队列中发送消息

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5612  2008-01-24 11:53  WindowsApplication3\Properties\Resources.resx

     文件        249  2008-01-24 11:53  WindowsApplication3\Properties\Settings.settings

     文件       1196  2008-01-24 11:53  WindowsApplication3\Properties\AssemblyInfo.cs

     文件       2893  2008-01-24 11:53  WindowsApplication3\Properties\Resources.Designer.cs

     文件       1103  2008-01-24 11:53  WindowsApplication3\Properties\Settings.Designer.cs

     文件       1888  2008-01-26 10:46  WindowsApplication3\Form1.cs

     文件       2232  2008-01-26 10:41  WindowsApplication3\Form1.Designer.cs

     文件       5814  2008-01-26 10:41  WindowsApplication3\Form1.resx

     文件       3245  2008-01-26 10:33  WindowsApplication3\WindowsApplication3.csproj

     文件       5632  2005-12-08 14:51  WindowsApplication3\bin\Debug\WindowsApplication3.vshost.exe

     文件      20480  2008-01-26 10:46  WindowsApplication3\bin\Debug\WindowsApplication3.exe

     文件      22016  2008-01-26 10:46  WindowsApplication3\bin\Debug\WindowsApplication3.pdb

     文件        180  2008-01-26 10:46  WindowsApplication3\obj\Debug\WindowsApplication3.Form1.resources

     文件        180  2008-01-26 10:46  WindowsApplication3\obj\Debug\WindowsApplication3.Properties.Resources.resources

     文件        842  2008-01-26 10:46  WindowsApplication3\obj\Debug\WindowsApplication3.csproj.GenerateResource.Cache

     文件      22016  2008-01-26 10:46  WindowsApplication3\obj\Debug\WindowsApplication3.pdb

     文件      20480  2008-01-26 10:46  WindowsApplication3\obj\Debug\WindowsApplication3.exe

     文件        352  2008-01-26 10:46  WindowsApplication3\obj\WindowsApplication3.csproj.FileList.txt

     文件        478  2008-01-24 11:53  WindowsApplication3\Program.cs

     目录          0  2008-01-24 11:53  WindowsApplication3\obj\Debug\TempPE

     目录          0  2008-01-26 10:30  WindowsApplication3\obj\Debug\Refactor

     目录          0  2008-01-24 11:53  WindowsApplication3\bin\Debug

     目录          0  2008-01-24 11:53  WindowsApplication3\obj\Debug

     目录          0  2008-01-24 11:53  WindowsApplication3\Properties

     目录          0  2008-01-24 11:53  WindowsApplication3\bin

     目录          0  2008-01-24 11:53  WindowsApplication3\obj

     目录          0  2008-01-24 11:53  WindowsApplication3

----------- ---------  ---------- -----  ----

               116888                    27



............此处省略0个文件信息

评论

共有 条评论