XML节点比较
本文关键字:比较 节点 XML | 更新日期: 2023-09-27 18:13:22
XML #1:
<row>
<USER_ID>2</USER_ID>
<USER_NAME>OOP</USER_NAME>
<EMAIL>example@gmail.com</EMAIL>
<PASSWORD>7515464</PASSWORD>
<USER_TYPE>3</USER_TYPE>
</row>
<row>
<USER_ID>3</USER_ID>
<USER_NAME>OOP</USER_NAME>
<EMAIL>example@gmail.com</EMAIL>
<PASSWORD>7515464</PASSWORD>
<USER_TYPE>3</USER_TYPE>
</row>
XML # 2: <row>
<USER_ID>4</USER_ID>
<USER_NAME>OS</USER_NAME>
<EMAIL>example@gmail.com</EMAIL>
<PASSWORD>7515464</PASSWORD>
<USER_TYPE>3</USER_TYPE>
</row>
<row>
<USER_ID>2</USER_ID>
<USER_NAME>OS</USER_NAME>
<EMAIL>example1@gmail.com</EMAIL>
<PASSWORD>7515464</PASSWORD>
<USER_TYPE>3</USER_TYPE>
</row>
我希望应用程序将两个堆栈分成块,并为每个块添加随机数,并通过使用多个线程比较这些子堆栈中的相应节点
this class generate random number
using System;
using System.Security.Cryptography;
class Program
{
static void Main()
{
using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider())
{
// Buffer storage.
byte[] data = new byte[4];
// Ten iterations.
for (int i = 0; i < 10; i++)
{
// Fill buffer.
rng.GetBytes(data);
// Convert to int 32.
int value = BitConverter.ToInt32(data, 0);
Console.WriteLine(value);
}
}
}
}