C#人事管理系统 第一天.NET难点加强及XAML基础
sender:代表本控件
Button btn1=(Button)sender;//拿到本控件
btn1.Text=”button控件显示的名字”;
集合类:
List<int> list1=new List<int>;
list1.Add(11);
list1.Add(22); //将数字22添加到集合list1中
类似于数组,但其中存储方式为链表,效率上不如数组
优点:可变长度
数组:
int[] a1=new int[2];
a1[0]=11;
a1[1]=22;
集合类其它属性:remove移除,count统计长度
MessageBox.Show(list1.count.ToString());
list1.remove(11);
XAML文件:
描述界面布局。xaml文件中添加属性:自动显示属性列表ctrl+j
文本框控件属性:显示与隐藏
Visibility的值是枚举类型:Visible可见 Collapsed不可见
txtBox1.Visibility=System.Windows.Visibility.Collapsed;
我不去想身后会不会袭来寒风冷雨,既然目标是地平线,留给世界的只能是背影 。

浙公网安备 33010602011771号