Can I make a custom attribute for csla property

Can I make a custom attribute for csla property

Old forum URL: forums.lhotka.net/forums/t/10644.aspx


kingmoon posted on Saturday, August 27, 2011

public static readonly PropertyInfo<int> TestIntProperty = RegisterProperty<int>(c => c.TestInt);

        [MyAttribute]

        public int TestInt

        {

            get { return GetProperty(TestIntProperty); }

            set { SetProperty(TestIntProperty, value); }

        }

 

Just like this , Can I ?

JonnyBee replied on Saturday, August 27, 2011

Yes, you can.

Just inherit from System.Attribute. You can also look at the

kingmoon replied on Saturday, August 27, 2011

Thank you for your answer.

Its usage just like a normal class.  

kingmoon replied on Saturday, August 27, 2011

 

Thank you for your answer.

Its usage just like a normal class.  

CryingAlso Must Use The System.Refection. 

 

Copyright (c) Marimer LLC