2 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for Gribouillis

This snippet is easy: it defines an immutable wrapper around a sequence type (list, deque, etc) which allows a class, function or module to expose a read only version of a sequence to the outer world. A constant wrapper around mapping types could also be defined in a similar manner.

Member Avatar for Gribouillis
2
574
Member Avatar for Lusiphur

As suggested by Duki in [URL="http://www.daniweb.com/forums/thread298488.html"]this thread[/URL] I figured I'd compile all the workable examples and explanations here towards the question of "Why do we use get/ set to change properties?" [QUOTE=pritesh2010]Properties provide the opportunity to protect a field in a class by reading and writing to it through the …

2
501

The End.