湖边的白杨树

探索是一种乐趣

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页

2014年1月4日

摘要: 1. Select "Debug -> Windows -> Breakpoints" from VS menu.2. Click "New -> Break at Function...".3.For the get, type:ClassName.get_Counter() For the set, type:ClassName.set_Counter(int)You'll get a "No Source Available" when the breakpoint is hit, but you 阅读全文
posted @ 2014-01-04 15:07 fdyang 阅读(215) 评论(0) 推荐(0)

2013年12月26日

摘要: 1. Exit the VS2012, and then re-open the solution.2. Clean the solution and build. 阅读全文
posted @ 2013-12-26 09:22 fdyang 阅读(245) 评论(0) 推荐(0)

2013年12月14日

摘要: 静态字段被类的所有实例所共享,即此类的所有实例都访问同一内存地址。 所以该内存位置的值变更的话,这种变更对所有的实例都可见。 class MyClass { int number = 1; static int staticNumber = 10; public void SetValue(int value1, int value2) { this.number = value1; staticNumber = value2; } public str... 阅读全文
posted @ 2013-12-14 23:14 fdyang 阅读(5584) 评论(0) 推荐(0)

摘要: C# 中有5个权限修饰符,用于控制对对象的访问权限。1. public: 访问不受限制. namespace, enum成员,interface成员 隐式的具有public 修饰符,不能在显式添加其他的修饰符。2. private: 访问权限限制在同一个class 或 struct内。 class 或 struct 中的成员如果不加修饰符,则默认的是private。3. protected: 访问权限限制在当前class 或 继承的class。 4. internal: 访问权限限制在当前的程序集.(project) class 或 struct 如果不加修饰符,则默认的是intern... 阅读全文
posted @ 2013-12-14 20:03 fdyang 阅读(321) 评论(0) 推荐(0)

2013年12月5日

摘要: 1. 在UI(Xaml) 里面直接绑定数据. ComboBox Item #1 ComboBox Item #2 ComboBox Item #3 效果如下:2. 动态绑定数据.2.1 绑... 阅读全文
posted @ 2013-12-05 13:13 fdyang 阅读(20520) 评论(0) 推荐(0)

2013年12月4日

摘要: 0. 什么是资源? .NET 框架中如何访问资源?所谓的资源就是程序中可利用的数据,譬如:字符串、图片和任何二进制数据,包括任何类型的文件。在面向对象的环境中,每一个类型都标识为某些程序所用的资源,要想使用这些资源,必须为相应的类型分配一定的内存空间。访问一个资源需要如下几个步骤:1)分配内存空间: 调用中间语言(IL)中的newobj指令(使用new操作符时,将产生newobj指令),为某个特定资源的类型分配一定的内存空间。2) 初始化内存: 一个类型的实例构造器负责这样的初始化工作。3)使用资源: 通过访问类型成员来使用资源。根据需要会有反复。4)销毁资源: 执行清理工作。5)释放内存: 阅读全文
posted @ 2013-12-04 22:46 fdyang 阅读(34605) 评论(0) 推荐(1)

2013年11月24日

摘要: 通过ObservableCollection 绑定到 DataGrid.1. 前台Xaml. 2. 后台CodeObservableCollection 如果是Struct的话,则不能正确的显示。原因未知,有空仔细研究一下。参考: http://... 阅读全文
posted @ 2013-11-24 20:37 fdyang 阅读(17219) 评论(0) 推荐(1)

2013年11月13日

摘要: Exception.Messagecontains only the message (doh) associated with the exception. Example:Object reference not set to an instance of an objectTheException.ToString()method will give a much more verbose output, containing the exception type, the message (from before), a stack trace, and all of these th 阅读全文
posted @ 2013-11-13 11:53 fdyang 阅读(678) 评论(0) 推荐(0)

2013年11月8日

摘要: 有时候不用 VS 调试,在 代码里面加入 Debug.Writeline(" Debug information!!"); 这个时候打开 debug view 就可以检测出输出了。另外有个前提是solution、或 project 必须是 debug 模式。在程序中,多数人会加入Debug、Trace等输出,当程序编译成Debug模式的时候,这些语句就会起作用,如果编译成Release模式,这些语句就会被自动去除。 阅读全文
posted @ 2013-11-08 19:09 fdyang 阅读(303) 评论(0) 推荐(0)

2013年10月21日

摘要: 原来还是需要两步走。1. 在refernece里面应用project或dll。2. 在xaml的命名空间里面手动添加。 阅读全文
posted @ 2013-10-21 21:34 fdyang 阅读(293) 评论(0) 推荐(0)

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页