Alex Rivera | Logout

What does the caret (‘^’) mean in C++/CLI?

Asked 2008-10-14T19:18:38.893
264

I just came across this code and a few Google searches turn up no explanation of this mysterious (to me) syntax.

Hashtable^ tempHash = gcnew Hashtable(iterators_);

IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator();

What the heck does the caret mean? (The gcnew is also new to me, and I asked about that here.)

Edit
Report

2 Answers

5

From MSDN, it looks like the caret means you are getting a handle to the type being created.

https://web.archive.org/web/20150117095313/http://msdn.microsoft.com/en-us/library/te3ecsc8%28VS.80%29.aspx

answered 2008-10-14T19:23:26.340
2

It means that it is a reference to a managed object.

answered 2008-10-14T19:20:09.950

Your Answer