>>>Thanks again.
>>
>>
>>Make it static then
>>
>>static private string xxx = "yyyy";
>>
>
>Thanks, that seems to compile. BTW, I don't understand a problem with VS 2005 SP1. It says build succeeded and then shows 100+ errors which are not really errors. Somehow it often can not resolve references properly and even often shows keywords highlighted as errors.
If you want to make it readonly
Readonly fields can be initialized (1) in the declaration and (2) in the constructor
A readonly field can be considered as a runtime constant
static class ClassName
{
static readonly string xxx = "yyy";
static readonly string zzz = AnotherClass.Method();
}
Gregory