随笔分类 -  C#

上一页 1 2

【转载】#274 - Can't Overload if Methods Differ Only by ref and out Modifiers
摘要:You can overload a method in a class, i.e. define two methods with the same name, if the methods have different lists of parameters. The parameter lists must differ in the number of parameters or in their types.For example, we can overload the Dog.Bark method if the parameters differ only in type:1 阅读全文

posted @ 2014-03-10 16:13 yuthreestone 阅读(253) 评论(0) 推荐(0)

【转载】#273 - Parameter Modifier Summary
摘要:Here's a summary of the different parameter modifiers and how the behavior changes for each, when using them with value-typed and reference-typed variables.No modifier - value typesCopy of value passed to methodMethod can read valueNo modifier - reference typesReference to object passed to metho 阅读全文

posted @ 2014-03-10 15:52 yuthreestone 阅读(200) 评论(0) 推荐(0)

【转载】#229 - The Core Principles of Object-Oriented Programming
摘要:As an object-oriented language, c# supports the three core principles of object-oriented programming:Encapsulation - Hide implementation details in a class from users of the class, exposing only a public interfaceInheritance - Derive a subclass from a parent class, inheriting data and behavior from 阅读全文

posted @ 2014-03-10 13:55 yuthreestone 阅读(207) 评论(0) 推荐(0)

上一页 1 2

导航