Re: Properties in C# and prop_Foo

2009-08-10 Thread Steven Schveighoffer
On Sun, 09 Aug 2009 15:53:23 -0400, Bill Baxter wrote: On Sun, Aug 9, 2009 at 11:25 AM, grauzone wrote: Bill Baxter wrote: Interesting thing I found out about C# properties. The syntax int Thing {   get { return _thing; }   set { _thing = value; } } is rewritten by the C# compiler into in

Re: Properties in C# and prop_Foo

2009-08-09 Thread Bill Baxter
On Sun, Aug 9, 2009 at 11:25 AM, grauzone wrote: > Bill Baxter wrote: >> >> Interesting thing I found out about C# properties. >> The syntax >> >> int Thing { >>   get { return _thing; } >>   set { _thing = value; } >> } >> >> is rewritten by the C# compiler into >> >> int prop_Thing() { return _th

Re: Properties in C# and prop_Foo

2009-08-09 Thread grauzone
Bill Baxter wrote: Interesting thing I found out about C# properties. The syntax int Thing { get { return _thing; } set { _thing = value; } } is rewritten by the C# compiler into int prop_Thing() { return _thing; } void prop_Thing(int value) { _thing = value; } Just thought it was inter

Re: Properties in C# and prop_Foo

2009-08-09 Thread Michel Fortin
On 2009-08-09 00:23:06 -0400, Bill Baxter said: Dang I remembered wrong from what I read yesterday. C# turns it into int get_Thing() { return _thing; } void set_Thing(int value) { _thing = value; } I don't recall anyone proposing exactly that for D. There was prop_Thing, and there was getTh

Re: Properties in C# and prop_Foo

2009-08-08 Thread Jarrett Billingsley
On Sun, Aug 9, 2009 at 12:23 AM, Bill Baxter wrote: > On Sun, Aug 9, 2009 at 10:43 AM, Bill Baxter wrote: >> Interesting thing I found out about C# properties. >> The syntax >> >> int Thing { >>   get { return _thing; } >>   set { _thing = value; } >> } >> >> is rewritten by the C# compiler into >>

Re: Properties in C# and prop_Foo

2009-08-08 Thread Bill Baxter
On Sun, Aug 9, 2009 at 10:43 AM, Bill Baxter wrote: > Interesting thing I found out about C# properties. > The syntax > > int Thing { >   get { return _thing; } >   set { _thing = value; } > } > > is rewritten by the C# compiler into > > int prop_Thing() { return _thing; } > void prop_Thing(int val

Properties in C# and prop_Foo

2009-08-08 Thread Bill Baxter
Interesting thing I found out about C# properties. The syntax int Thing { get { return _thing; } set { _thing = value; } } is rewritten by the C# compiler into int prop_Thing() { return _thing; } void prop_Thing(int value) { _thing = value; } Just thought it was interesting given all our