摘要: public class StudentList:ObservableCollection<Student> { public List<Student> studentList = new List<Student>(); public StudentList() { using (mydbEnt 阅读全文
posted @ 2016-10-20 16:06 FredGrit 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 重载overload 派生类和基类的方法同名,其中访问修饰符(public,private,protected,internal,protected internal),返回类型,参数类型,个数,顺序中的一个或若干可以不同,实现可以不同; 重写override 必须对抽象类中声明的abstract方 阅读全文
posted @ 2016-10-20 15:00 FredGrit 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 接口实现: interface IMath { void Add(int x, int y); } public class MathClass : IMath { public void Add(int x, int y) { Console.WriteLine("This is the inte 阅读全文
posted @ 2016-10-20 14:17 FredGrit 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 1. 绑定到其它元素 <Grid> <StackPanel > <TextBox x:Name="textBox1" Height="150" BorderBrush="Black" BorderThickness="10"/> <Label Content="{Binding ElementNam 阅读全文
posted @ 2016-10-19 17:30 FredGrit 阅读(168) 评论(0) 推荐(0) 编辑
摘要: xmlns:sys="clr-namespace:System;assembly=mscorlib" <Window.Resources> <Style TargetType="TextBlock"> <Setter Property="Margin" Value="10"/> <Setter Pr 阅读全文
posted @ 2016-10-19 16:15 FredGrit 阅读(511) 评论(0) 推荐(0) 编辑
摘要: Mode,它的类型为BindingMode的枚举类型,可以取TwoWay、OneWay、OnTime、OneWayToSource、Default。 oneWay:使用 OneWay 绑定时,每当源发生变化,数据就会从源流向目标。 OneTime: 绑定也会将数据从源发送到目标;但是,仅当启动了应用 阅读全文
posted @ 2016-10-19 15:56 FredGrit 阅读(2404) 评论(0) 推荐(0) 编辑
摘要: C# 方法默认访问级别 : private C# 类默认访问级别 : internalpublic:访问不受限制。protected:访问仅限于包含类或从包含类派生的类型。Internal:访问仅限于当前程序集。protected internal:访问限制到当前程序集或从包含派生的类型的类别。pr 阅读全文
posted @ 2016-10-18 13:33 FredGrit 阅读(1322) 评论(1) 推荐(0) 编辑
摘要: static void Main(string[] args) { int[] arr = { 1, 3, 3, 3, 3, 4, 5, 4, 5, 8, 9, 3 }; //不重复 var unique = arr.GroupBy(o => o).Where(g => g.Count() == 1 阅读全文
posted @ 2016-10-18 00:28 FredGrit 阅读(652) 评论(0) 推荐(0) 编辑
摘要: static List<int> Given50RandomNumbers() { List<int> intList = new List<int>(); for(int i=1;i<=50;i++) { intList.Add(i); } if(intList.Count>0) { return 阅读全文
posted @ 2016-10-18 00:18 FredGrit 阅读(666) 评论(0) 推荐(0) 编辑
摘要: 索引是与表或视图关联的磁盘上结构,可以加快从表或视图中检索行的速度。 索引包含由表或视图中的一列或多列生成的键。 这些键存储在一个结构(B 树)中,使 SQL Server 可以快速有效地查找与键值关联的行。 表或视图可以包含以下类型的索引: 群集 聚集索引根据数据行的键值在表或视图中排序和存储这些 阅读全文
posted @ 2016-10-08 20:00 FredGrit 阅读(471) 评论(0) 推荐(0) 编辑