我有listBox1中的16个项目和一个按钮“button1”,我需要能够在按下按钮时将所选项目从listBox1移动到listBox2 . 目前我的代码是
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.IO;
namespace courseworkmodule
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
String workingDir = Directory.GetCurrentDirectory();
XmlTextReader textReader = new XmlTextReader(workingDir + @"\modules.xml");
Console.WriteLine("BaseURI:" + textReader.BaseURI);
textReader.Read();
while (textReader.Read())
{
textReader.MoveToElement();
if (te