|
-
September 29th, 2010, 07:41 PM
#1
: this ......... what does it mean??
Hello guys,
I was reading a book about csharp called
"Pro C# 2010 and .NET 4 Platform"
I came across a piece of code that i dont understand. the book doesnt explain it and i cant continue knowing there is a piece of info that i didnt understand.
I would really appreciate if someone could help me understand the code on the line number 19
1> public enum PointColor
2> { LightBlue, BloodRed, Gold }
3> class Point
4> {
5> public int X { get; set; }
6> public int Y { get; set; }
7> public PointColor Color{ get; set; }
8> public Point(int xVal, int yVal)
9> {
10> X = xVal;
11> Y = yVal;
12> Color = PointColor.Gold;
13> }
14> public Point(PointColor ptColor)
15> {
16> Color = ptColor;
17> }
18> public Point()
19> : this(PointColor.BloodRed){ } <<<<<<<<<<<<<< I need to understand this line
20> public void DisplayStats()
21> {
22> Console.WriteLine("[{0}, {1}]", X, Y);
23> Console.WriteLine("Point is {0}", Color);
24> }
25> }
thanks guys.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|