1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-18 12:31:22 +02:00

C#: Auto-implemented properties

This commit is contained in:
Max Yankov
2013-08-17 16:03:35 +02:00
parent 541fd3fb06
commit 4295e85d60

View File

@@ -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.