I have placed text within a resouce file.
The class has a reference to a Resource Manager LocRM created in the
constructor. I want to reference the text within the resource file when
declaring a property. See below.
[Description(thi s.LocRM.GetText ("strTestCatego ryID")),
Category(TestCa seStrings.strLa belDescription) ,
DefaultValueAtt ribute(TestingC ategories.Testi ngCategory.Misc ellaneous)]
public virtual TestingCategori es.TestingCateg ory TestCategory
{
get { return category; }
set { category = value; }
}
Obviously the compiler generates an error because it is expecting a constant
string where I'd like the this.LocRM("... .").
How do I reference text within a resource file and place it in an attribute
above?
--
Steve
The class has a reference to a Resource Manager LocRM created in the
constructor. I want to reference the text within the resource file when
declaring a property. See below.
[Description(thi s.LocRM.GetText ("strTestCatego ryID")),
Category(TestCa seStrings.strLa belDescription) ,
DefaultValueAtt ribute(TestingC ategories.Testi ngCategory.Misc ellaneous)]
public virtual TestingCategori es.TestingCateg ory TestCategory
{
get { return category; }
set { category = value; }
}
Obviously the compiler generates an error because it is expecting a constant
string where I'd like the this.LocRM("... .").
How do I reference text within a resource file and place it in an attribute
above?
--
Steve
Comment