Compile error when having __gc

  • Thread starter Thread starter TonyJ
  • Start date Start date
T

TonyJ

Hello!

I get compile error in VS2005 but not in VS2003 for the same project.
Here is the row that the compiler complains about
public __gc class ReasonDialog : public System::Windows::Forms::Form

I read in the documentation that this is the old syntax but I want to use
the new syntax.
So is the new syntax just to remove the two underscore before the gc.

//Tony
 
Hi,

TonyJ said:
Hello!

I get compile error in VS2005 but not in VS2003 for the same project.
Here is the row that the compiler complains about
public __gc class ReasonDialog : public System::Windows::Forms::Form

I read in the documentation that this is the old syntax but I want to use
the new syntax.
So is the new syntax just to remove the two underscore before the gc.

Please check the MSDN for the syntax differences.

In your case it should be:

public ref class ReasonDialog : public System::Windows::Forms::Form
 
Back
Top