Search:
Namespaces
Discussions
.NET v1.1
Feedback
Compiler Error C3222
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.languages.vc
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...
Daniel Lidström (VIP)
Compiler Error C3222'parameter' : cannot declare default arguments for
member functions of a managed type
Arrrgggghhhhh!
Reply to this message...
Roman Yankin
Here us what you can do, say you have the situation like in MS sample:
// C3222.cpp
// compile with: /clr
#using <mscorlib.dll>
public __gc class G
{
void f( int n = 0 ); // C3222
};You can workaround this problem by adding overloaded member function with
no parameters and call the original function from there:
// NoC3222.cpp
// compile with: /clr
#using <mscorlib.dll>
public __gc class G
{
void f( int n );
void f(void);
};
void G::f(int n){
//do something with n here
}
void G::f(){
f(100);
}
"Daniel Lidstr?m" <
Click here to reveal e-mail address
> wrote in message
news:j72fsfpjmdq2.yxx8lb0w6pvy$.
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com