diff options
| author | Max Yankov <golergka@gmail.com> | 2013-08-17 16:03:35 +0200 | 
|---|---|---|
| committer | Max Yankov <golergka@gmail.com> | 2013-08-17 16:03:35 +0200 | 
| commit | 4295e85d6097e2d331ff75a958a3a5a064795410 (patch) | |
| tree | c288c881fdcc58b5094f0e2322ade1ca24e1f54d | |
| parent | 541fd3fb06bf6e97974123934ad89cb07a7ef289 (diff) | |
C#: Auto-implemented properties
| -rw-r--r-- | csharp.html.markdown | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/csharp.html.markdown b/csharp.html.markdown index 490c34bb..951958b6 100644 --- a/csharp.html.markdown +++ b/csharp.html.markdown @@ -480,13 +480,13 @@ namespace Learning              set { _hasTassles = value; }          } -        private int _frameSize; +        // Properties can be auto-implemented          public int FrameSize          { -            get { return _frameSize; } +            get;              // you are able to specify access modifiers for either get or set              // this means only Bicycle class can call set on Framesize -            private set { _frameSize = value; } +            private set;          }          //Method to display the attribute values of this Object. | 
