tags:

views:

1652

answers:

1

Hi,

"Operation is not valid due to the current state of the object" exception is thrown at .Clone() operation in .net.

I'm using framework 2.0.

Any ideas what the reason could be.

Thanks in advance.

ravi

+1  A: 

Your question unfortunately doesn't contain enough information to be given a straight answer.

However, you could definitely try to analyze the Clone method of the object throwing exceptions at you using Reflector.

norheim.se
Code fails at the following statement.installmentPeriod = (DatePeriod)period.Clone();where period is inherited from ICloneable interface.This is hapening while I'm debugging the code.Can Reflector be used while debugging
Thanks for your help. I found the answer for the question. Issue was there is an exception thrown in one of the methods during cloning. Thanks again.