TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C# Coding Standard
Search

Rule:  5@116

Synopsis:Always document when a member returns a copy of a reference type or array
Language:C#
Severity Level:5
Category:Object lifecycle


Description:
By default, all members that need to return an internal object or an array of objects will return a reference to that object or array. In some cases, it is safer to return a copy of an object or an array of objects. In such case, always clearly document this in the specification.