G
Guest
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(this.LocRM.GetText("strTestCategoryID")),
Category(TestCaseStrings.strLabelDescription),
DefaultValueAttribute(TestingCategories.TestingCategory.Miscellaneous)]
public virtual TestingCategories.TestingCategory 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?
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(this.LocRM.GetText("strTestCategoryID")),
Category(TestCaseStrings.strLabelDescription),
DefaultValueAttribute(TestingCategories.TestingCategory.Miscellaneous)]
public virtual TestingCategories.TestingCategory 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?