In C++ the intellisense displays if the return value is a pointer which is really nice.
Is there a way to know easily if the assignment will yield a copy or a reference
In C++ the intellisense displays if the return value is a pointer which is really nice.
Is there a way to know easily if the assignment will yield a copy or a reference
Is there a quick way to know if the return value is a copy or reference?
xpmedia
Any particular reason why this is not provided for C# I just think it really nice if you don't have to look at the help file everytime you first use a new method(also the assign operator for first-time use object) or to learn about a method you used 2-3 months ago.
This just came to my mind after I was asked to fix a bug in an area of a software that I'm not normally assigned to because the main guy is on vacation. I'm not into second guessing what other programmers do, so mostly, I concertrate on "logic" part of the code that someone else wrote instead of scrutinizing his/her coding style.
Davy Van Melkebeke
If you want to specify this with your own method you can use the Xml Domentation Comment of C#, see: XML Documentation Comments (C# Programming Guide).
hklbj
If thinks are a copy or not can't be marked by a type. This is allways the documentation that can tell you such things.
Can you give us an example when you need it with relevant code