Ray's playground

 

Item 18: Distinguish Between Value Types and Reference Types(Effective C#)

  Build low-level data storage types as value types. Build the behavior of your application using reference types. You get the safety of copying data that gets exported from your class objects. You get the memory usage benefits that come with stack-based and inline value storage, and you can utilize standard object-oriented techniques to create the logic of your application. When in doubt about the expected use, use a reference type.

posted on 2011-01-27 23:16  Ray Z  阅读(200)  评论(0编辑  收藏  举报

导航