文件名称:一个小程序:窗口显示所需内容
文件大小:765KB
文件格式:ZIP
更新时间:2021-07-14 05:04:47
一个程序 窗口显示
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
//类对象的实例化
//MyClass mc = new MyClass();
////类型转换
//Interface1 i1 = (Interface1)mc;
//this.textBlock.Text=i1.Add(3, 5).ToString();
//Interface2 i2 = (Interface2)mc;
//this.textBlock.Text += " "+i2.Add(3, 5).ToString();
//Student st = new Student();
//st.sno = "0101001";
//st.name = "Tom";
//st.age = 18;
//
var st1 = new Student { sno = "0101001", name = "Tom", age = 18 };
//this.textBlock.Text = st.sno + "--" + st.name + "--" + st.age;
var p = new { sno = "0101002", name = "Jack", age = 20 };
// this.textBlock.Text +="\n" + p.sno + "--" + p.name + "--" + p.age;
List
【文件预览】:
MyWpfApp20171030
----MyWpfApp20171030.sln(1015B)
----MyWpfApp20171030()
--------Student.cs(314B)
--------Interface1.cs(344B)
--------App.xaml.cs(343B)
--------MyWpfApp20171030.csproj(5KB)
--------MainWindow.xaml.cs(3KB)
--------MyClass.cs(749B)
--------MainWindow.xaml(904B)
--------Properties()
--------App.config(189B)
--------App.xaml(386B)
--------obj()
--------bin()
----.vs()
--------MyWpfApp20171030()