المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C# Program Being Linked with Wrong .NET Version



C# Programming
11-09-2009, 08:01 PM
My C# program is set to target the 2.0 version of the .NET Framework.

I used one of the overloads of WaitHandle.WaitAny that's only available in the 3.0 version of the framework, and it let me build the program and run it!

Is this supposed to occur?

The problem is that when I run the program on a machine that only has version 2.0 of the framework, the program crashes, of course.

But why did Visual Studio allow me to use an overload from the 3.0 version when it shouldn't have?