using System;
using System.Collections.Generic;
using System.Linq;
using System.Messaging;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{

class Program
{
static void Main(string[] args)
{
//
var qs = MessageQueue.GetPrivateQueuesByMachine("isc-2065");// 机器名
MessageQueue queue = new MessageQueue("FormatName:DIRECT=OS:isc-2065\\private$\\spc/msmqyahooservice.svc");//对应的消息管道
// Delete all messages from the queue.

queue.Purge();
}

}
}

C# 清理消息管道的消息

相关文章:

  • 2021-07-14
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2022-02-24
猜你喜欢
  • 2022-12-23
  • 2021-08-26
  • 2022-03-07
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
相关资源
相似解决方案