新手求助:按时间输出数组
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.Threading;
using System.Diagnostics;
using System.Collections;
using ThreadingTimer = System.Threading.Timer;
using TimersTimer = System.Timers.Timer;
namespace Timer_Threading
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
ThreadingTimer _ThreadTimer = null;
ArrayList TextValueSeries = new ArrayList();
float order;
string aaaa;
private void Form1_Load(object sender, EventArgs e)
{
}
delegate void UpdateControl(Control Ctrl, string Msg);
private object _objLock = new object();
void _mUpdateControl(Control Ctrl, string Msg)
{
lock (this._objLock)
{
if (Ctrl is ListBox)
((ListBox)Ctrl).Items.Add(Msg);
}
}
private void button1_Click(object sender, EventArgs e)
{
float j = 0;
order = float.Parse(textBox1.Text);
for (int i = 0; i < order ; i++)
{
TextValueSeries.Add(j);
j++;
}
&