复杂例子:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
namespace Test2
{
//public delegate double Calc(double x, double y);
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void nothing()
{
//ADic.Add("w", 2);
//Console.WriteLine(ADic["w"]);
//Console.WriteLine(ADic.ContainsKey("w"));
//Bitmap img = new Bitmap("C:\\ESouceCode\\Eweb-main\\易网页1.0\\photos\\宣传AND图片\\陽.png");
//pictureBox1.Image = img;
//string test = "qwerty112233445566";
//Console.WriteLine(test.Substring(0, 1));
//Console.WriteLine(test.Replace("3", "ddd"));
//Console.WriteLine(test);
//int[] intarray = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 };
//IEnumerator theenumerator = intarray.GetEnumerator();
//while (theenumerator.MoveNext())
//{
// Console.WriteLine(theenumerator.Current);
//}
//int[] arr = new int[] { 1, 2, 3, 4, 5 };
//foreach (int i in arr)
//{
// Console.WriteLine(arr[i - 1]);
//}
//List<int> thelist = new List<int>();
//thelist.Insert(0, 1);
//thelist.Insert(0, 2);
//thelist.Insert(0, 3);
//thelist.Insert(0, 4);
//thelist.Insert(0, 4);
//thelist.Insert(0, 4);
//thelist.Insert(0, 4);
//thelist.Insert(0, 4);
//thelist.Insert(0, 5);
//thelist.RemoveAt(0);
//throw new Exception("e");
//List<int> rem = new List<int> { 4, 2 };
//thelist.RemoveAll(member => rem.Contains(member));
//thelist.Remove(4);
//foreach (int i in thelist)
//{
// Console.WriteLine(i);
//}
//Console.WriteLine(Math.PI);
//test t1 = new test();
//test t2 = new test();
//t1.SetI(2);
//t1.PrintI();
//t2.SetI(9);
//t2.PrintI();
//t1.PrintI();
//int i = 0;
//ecde(ref i);
//}
}
public void nothing2()
{
//button2.Click += Button2_ClickTest;
//Func<int> testFunc = new Func<int>(testThread);
//AsyncCallback testCallBack_AC = new AsyncCallback(testCallBack);
//testFunc.BeginInvoke(testCallBack_AC, null);
//Calculator ACalculator = new Calculator();
//Calc calc1 = new Calc(ACalculator.Add);
//ProductFactory TheproductFactory = new ProductFactory();
//WarpFactroy ThewarpFactroy = new WarpFactroy();
//Func<Product> fun1 = new Func<Product>(TheproductFactory.MakePizza);
//Func<Product> fun2 = new Func<Product>(TheproductFactory.MakeToyCar);