summaryrefslogtreecommitdiffhomepage
path: root/csharp.html.markdown
diff options
context:
space:
mode:
authorMax Yankov <golergka@gmail.com>2013-08-17 16:03:35 +0200
committerMax Yankov <golergka@gmail.com>2013-08-17 16:03:35 +0200
commit4295e85d6097e2d331ff75a958a3a5a064795410 (patch)
treec288c881fdcc58b5094f0e2322ade1ca24e1f54d /csharp.html.markdown
parent541fd3fb06bf6e97974123934ad89cb07a7ef289 (diff)
C#: Auto-implemented properties
Diffstat (limited to 'csharp.html.markdown')
-rw-r--r--csharp.html.markdown6
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.