public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void button_Click(object sender, RoutedEventArgs e) { //类对象的实例化 //MyClass mc = new MyClass(); ////类型转换