随笔分类 -  C#

C#编程语言探秘
重磅来袭,水木PC客户端全面改版,欢迎使用!
摘要:2016-11-04 下载 最新更新 1、优化帖子中回文内容的显示,采用相比正文较小的字体,以及置灰处理,突出正文。 2、可配置是否隐藏帖子中的IP和修改信息,并添加到设置中心,隐藏后的界面内容更为简洁。 3、添加浏览历史记录,已访问的链接将被着色。 2016-10-31 最新更新 1、加入板块查询 阅读全文

posted @ 2016-09-13 22:09 iPersia 阅读(970) 评论(3) 推荐(0)

CLR via C# 3rd - 08 - Methods
摘要:Kinds of methods Constructors Type constructors Overload operators Type conversions (forimplicitandexplicitcasting) Extension methods Partial methods. 1.Instance Constructors and Classes (Reference Types) Constructor methods are always called.ctor(forconstructor) in a method definitionmet... 阅读全文

posted @ 2014-03-06 09:23 iPersia 阅读(404) 评论(0) 推荐(0)

IL命令
摘要:部分CIL 操作码操作码 作用add, sub, mul, div, rem 用于两个数加减乘除求模add, or, not, xor 用于在两个值上进行二进制操作ceq, cgt, clt用不同的方法比较两个在栈上的值,ceq:是否相等;cgt:是否大约;clt:是否小于box, unbox 在引用类型和值类型之间转换ret 退出方法和返回一个值beq, bgt, ble, blt, switch 控制方法中的条件分支,beg:如果相等就中止到代码标签;bgt:如果大于就中止到代码标签; ble:如果小于等于就中止到代码标签;blt:如果小于就中止到代码标签; 所有的分支控制操作码都需要给出 阅读全文

posted @ 2014-03-03 16:02 iPersia 阅读(553) 评论(0) 推荐(0)

CLR via C# 3rd - 07 - Constants and Fields
摘要:1. Constants Aconstantis a symbol that has a never-changing value.When defining a constant symbol,its value must be determinable at compile time. The compiler then saves the constant’s valuein the assembly’s metadata. This means that you can define a constant only for types thatyour compiler consid. 阅读全文

posted @ 2014-03-03 15:12 iPersia 阅读(174) 评论(0) 推荐(0)

CLR via C# 3rd - 06 - Type and Member Basics
摘要:1. Different Kinds of Type MembersA type can define zero or more of the following kinds of members: Constants A constant is a symbol that identifies a never-changing data value Fields A field represents a read-only or read/write data value Instance constructors An instance constructor is a s... 阅读全文

posted @ 2014-03-03 11:09 iPersia 阅读(178) 评论(0) 推荐(0)

CLR via C# 3rd - 05 - Primitive, Reference, and Value Types
摘要:1.Primitive Types Any data types thecompiler directly supportsare calledprimitive types. Primitive types map directly to typesexisting in the Framework Class Library (FCL). For the types thatare compliant with the Common Language Specification (CLS), other languages will offersimilar primitive ty... 阅读全文

posted @ 2014-03-03 11:08 iPersia 阅读(436) 评论(0) 推荐(0)

CLR via C# 3rd - 04 - Type Fundamentals
摘要:1. System.Object The runtime requires every type to ultimately be derived from theSystem.Objecttype. Because all types are ultimately derived from System.Object, you are guaranteed that everyobject of every type has a minimum set of methods. Specifically, the System.Object classoffers thepublicins.. 阅读全文

posted @ 2014-03-03 11:05 iPersia 阅读(305) 评论(0) 推荐(0)

CLR via C# 3rd - 03 - Shared Assemblies and Strongly Named Assemblies
摘要:1. Weakly Named Assembly vs Strong Named Assembly Weakly named assemblies and strongly named assemblies are structurally identical—that is, they use the same portable executable (PE) file format, PE32(+) header, CLR header, metadata,manifest tables, and Intermediate Language (IL) . Thereal differe.. 阅读全文

posted @ 2014-03-03 10:57 iPersia 阅读(249) 评论(0) 推荐(0)

CLR via C# 3rd - 02 - Building, Packaging, Deploying, and Administering Applications and Types
摘要:1. C# Compiler - CSC.exe csc.exe /out:Program.exe /t:exe /r:MSCorLib.dll Program.cs This command line tells the C# compiler to emit an executable file called Program.exe(/out:Program.exe). The type of file produced is a Win32 console application(/t[arget]:exe). csc.exe /out:Program.exe /t:exe P... 阅读全文

posted @ 2014-03-03 10:53 iPersia 阅读(365) 评论(0) 推荐(0)

CLR via C# 3rd - 01 - The CLR's Execution Model
摘要:1. Assemly A managed module is a standard 32-bit Microsoft Windoes portable executable (PE32) file or a standard 64-bit Windows portable executable (PE32+) file that requires the CLR to execute. Managed Module = IL + metadata. Assembly offers a way to treat a group of files asa single entity. An... 阅读全文

posted @ 2014-03-03 10:49 iPersia 阅读(277) 评论(1) 推荐(0)

计算纯文本情况下RichTextBox实际高度的正确方法(.NET)
摘要:2016-07-17重大更新 其实有更好、更系统的方法,也是最近才发现的,分享给大家!! 在WinForm开发中,经常会用到RichTextBox控件,也经常会碰到需要自动调节RichTextBox高度的场景。本人鉴于这种情况,查阅了一些资料,确定了正确的方法。 基本思路就是获取RichTextBo 阅读全文

posted @ 2013-07-24 16:52 iPersia 阅读(2352) 评论(3) 推荐(0)

【自主开发】电商产品价格实时抓取小工具
摘要:各位朋友,你是不是曾经想从网店够买心仪的产品,奈何一次又一次的错过好价格呢?如果你曾经碰到过,那么下面的这个小工具也许可以帮你买到心仪的产品。 好价的出现往往随机的,而且时间短暂。机会是给有准备的人的。难道时时的关注网站,不停的刷新页面,才能等到机会么,当然不是。这种低级、乏味的事情当然要由电脑来做啦! 好,不扯皮了,下面开始介绍故事的主角:电商产品价格实时抓取小工具! 这个小工具是我在工作之余完成的,它可以实时的抓取指定商品的价格,是否有货等状态,并在达到心理价位上,弹窗提醒用户。 1、支持的电商京东(360buy)亚马逊(Amazon.cn)易迅(51buy)当当(dangd... 阅读全文

posted @ 2013-02-01 17:31 iPersia 阅读(2453) 评论(7) 推荐(0)

DevExpress报表开发基本流程
摘要:一、DevExpress简介 1、DevExpresss是针对.NET平台开发的一整套组件解决方案–1、功能完备的可视化组件–2、VisualC# 编写–3、良好的兼容性:大多组件都是对VS自带的控件功能进行的扩展,并都是直接继承自所要扩展的控件本身2、DevExpress WinForms Controls3、DevExpress.XtraReports•报表控件–DevExpress.XtraReports.UI.XtraReport•报表组件–XRTable–XRPageInfo… 4、DevExpress.XtraReports.UI.XtraReport Types •Table . 阅读全文

posted @ 2011-08-29 17:49 iPersia 阅读(2966) 评论(0) 推荐(2)

PETSHOP之分层设计
摘要:纵观PETSHOP,感觉最重要的一点就是分层结构,以及分层的目的。 分层可以达到以下效果: 1、开发人员可以只关注整个结构中的其中某一层; 2、可以很容易的用新的实现来替换原有层次的实现; 3、可以降低层与层之间的依赖; 4、有利于标准化; 5、利于各层逻辑的复用。 总之是:分散关注、松散耦合、逻辑复用、标准定义。 “金无足赤,人无完人”,分层式结构也不可避免具有一些缺陷: 1、降低了系统的性能。这是不言而喻的。如果不采用分层式结构,很多业务可以直接造访数据库,以此获取相应的数据,如今却必须通过中间层来完成。 2、有时会导致级联的修改。这种修改尤其体现在自上而下的方向。如果在表示层中需要增.. 阅读全文

posted @ 2011-08-19 22:48 iPersia 阅读(393) 评论(2) 推荐(1)

导航