473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VC.NET 2005 and ^

Hi,

I have a RC version of VC.NET 2005 for testing purpose and i would like to
understand the purpose of ^ character.

Now instead to write :

String strTest="";

we need to write :
String^ strTest= "";

why and what are the implications of this changes ?
i did not find any information in help about it except few words and without
any real detail.

Precision : i'm working under Windows.Forms.

thanks a lot,
Maileen
Nov 17 '05 #1
5 840
Maileen wrote:
Hi,

I have a RC version of VC.NET 2005 for testing purpose and i would
like to understand the purpose of ^ character.

Now instead to write :

String strTest=""; You mean instead of String* strTest="" (old C++ Managed syntax).
we need to write :
String^ strTest= "";

why and what are the implications of this changes ? The purpose is to make clearer the difference between pointers (pointing to
native objects) and handles (referencing managed objects). The latter ones
were called "__gc pointers" in managed C++.
i did not find any information in help about it except few words and
without any real detail.

You didn't search strong enough ;-)
http://msdn2.microsoft.com/en-us/library/yk97tc08 (&mong many other articles
on the subject).

Arnaud
MVP - VC
Nov 17 '05 #2
http://www.voidnish.com/articles/Sho...=cppcliintro01

--
Regards,
Nish [VC++ MVP]
"Maileen" <Ma*****@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
Hi,

I have a RC version of VC.NET 2005 for testing purpose and i would like to
understand the purpose of ^ character.

Now instead to write :

String strTest="";

we need to write :
String^ strTest= "";

why and what are the implications of this changes ?
i did not find any information in help about it except few words and
without
any real detail.

Precision : i'm working under Windows.Forms.

thanks a lot,
Maileen

Nov 17 '05 #3
I think this is one of the best extensions they did and it looks like C++ in
a way. It is also very clear to see the difference between * and ^
pointers.

Tom

"Arnaud Debaene" <ad******@club-internet.fr> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
The purpose is to make clearer the difference between pointers (pointing
to native objects) and handles (referencing managed objects). The latter
ones were called "__gc pointers" in managed C++.

Nov 17 '05 #4
OK, now I'm worried. If I upgrade to 2005 from 2003 does this mean all my
managed pointers (*) must now be changed to handles (^), that all my managed
new's must be changed to gcnew, etc.? Or is it backwards compatible and
these are new addtional features?

[==P==]

"Nishant Sivakumar" <ni**@nospam.asianetindia.com> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...
http://www.voidnish.com/articles/Sho...=cppcliintro01

--
Regards,
Nish [VC++ MVP]
"Maileen" <Ma*****@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
Hi,

I have a RC version of VC.NET 2005 for testing purpose and i would like
to
understand the purpose of ^ character.

Now instead to write :

String strTest="";

we need to write :
String^ strTest= "";

why and what are the implications of this changes ?
i did not find any information in help about it except few words and
without
any real detail.

Precision : i'm working under Windows.Forms.

thanks a lot,
Maileen


Nov 17 '05 #5
Hi Peter!
OK, now I'm worried. If I upgrade to 2005 from 2003 does this mean all my
managed pointers (*) must now be changed to handles (^), that all my managed
new's must be changed to gcnew, etc.? Or is it backwards compatible and
these are new addtional features?


You can use the "/clr:oldsyntax" switch to be (mostly) compatible with
VC2003.

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.