[nem-en] Properties and backing fields

Kamil Skalski kamil.skalski at gmail.com
Wed Apr 18 08:51:04 CEST 2007


Such fields are put into a macro attribute on the property and that
macro is then generating the actual field.

2007/4/18, Sergei Tulentsev <sergei.tulentsev at gmail.com>:
> Consider this code:
>     public SomeProperty : int
>     {
>       mutable _back : int;
>       get { _back }
>       set{_back = value;}
>     }
>
> I cannot get to that _back field using PExpr form of property. Yeah, of
> course, I can get it as Token.LooseGroup, but that just doesn't seem
> "right".
> Maybe, if we allow defining fields inside properties, then shall we go
> further and add something like "fields" property to a ClassMember.Property
> and/or PropertyBuilder?
> --
> Best wishes,
> Sergei Tulentsev
> Senior software engineer.
>
> SITRONICS Telecom Solutions, Moscow
> http://www.sitels.ru
> mob: + 7 916 507 7112
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list