Click to See Complete Forum and Search --> : Anyway to derive from ContextAttribute?


Jamesson
April 19th, 2005, 08:41 AM
Hello,

I'm new to the .Net scene and was wondering if anyone can help me out on this one.
I found some C# AOP examples on Logging and I am trying to implement the same functionality within a C++ app, but came across a roadblock.

Is there anyway to derive from System::Runtime::Remoting::.Contexts::ContextAttribute?

No matter what I try I get a "no appropriate default constructer available" error.

Thank you in advance.
Cheers
Jim

cilu
April 25th, 2005, 08:39 AM
No. From MSDN:
This type supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Jamesson
April 25th, 2005, 10:16 AM
Thank you for the reply.

I know msdn states that, but it is posssible to do it from c#.

Why can't I do it from C++.

Is the only possible way, to wrap the c# code in a library and then call that from my code?

Cheers
Jim