/// <summary> /// MainWindow.xaml 的交互逻辑 /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); TestStaticList.ShowAll(); } } internal class TestStaticList { static List<string> tmp = new List<string> { "hello", "world", "test" }; internal static void ShowAll() { Console.Write("show all: "); foreach (var item in tmp) { Console.Write(item + " "); } Console.WriteLine(""); } }