[AttributeUsageAttribute(AttributeTargets.Method |
AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
        public sealed class XYZAttribute : Attribute
        {
        }


Usage 1:

        [XYZ]
        public virtual bool Property1
        {
            get { return true; }
        }

Usage 2:

      [XYZ]
                public string Property2
                {
                        get { return ReadString(property2_s); }
                        set { Write(property2_s, value); }
                }


Usage on a method: (returns right results)

[XYZ]
public void Method1
{ }

Thanks,

On Jul 25, 10:42 am, Jb Evain <[email protected]> wrote:
> On Mon, Jul 25, 2011 at 6:37 PM, deedee <[email protected]> wrote:
> > Iterating through the MethodDef
>
> No I mean, please show the code with the properties and the custom attributes.
>
> Jb

-- 
--
mono-cecil

Reply via email to