views:

231

answers:

1

Is there any way to declare/define global/static objects of managed types ?

+1  A: 

Although you can have static methods and members in managed code, .NET does not have any concept of a global or completely static object. You can have a class with all static members (and in C#, it can be called a static class, but this is a compiler construct).

However, you can effectively do this via Singletons in C++/CLI. The same issues that exist with Singletons in C# map to C++/CLI when dealing with managed classes.

Reed Copsey
I see ... Thanks for the answer !
shadeMe