سؤال

I have such piece of code:

var t = new Thread(ShowStatus);
t.SetApartmentState(ApartmentState.STA);

And once I've got exception ArgumentOutOfRangeException on second line. How is it possible? And what can I do to prevent it from happenning again later?

Thanks in advance!

هل كانت مفيدة؟

المحلول

Debugger can show you wrong line of source code if symbols are incorrect. Verify your exception source from stack trace in the exception.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top