chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hi,

when executing the following
[TestFixture]
   public class ClassName2
   {
      [Test]
      public void MethodName()
      {
            className1 className1=new className1();
         ObjectState objectState=new ObjectState(className1);

            objectState.ResetState();
      }
   }

   public class className1
   {
      public const int i = 0;
   }


i get System.FieldAccessException
Message: Cannot set a final field.
i suppose that the correct way is not to attemp to reset the value of a constant or a readonly var
asked by tolisss (28.8k points)

2 Answers

0 votes
i suppose that the correct way is not to attemp to reset the value of a constant or a readonly var


Hi,
Very true, we are going to fix this one and send an update,
Again thanks alot for pointing this out. :wink:
answered by scott (32k points)
0 votes
This is fixed in version 2.2.2 (will be out soon)
answered by scott (32k points)
...