473,504 Members | 13,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how many places refer to an object? can this be resolved?

ok so lets say i have a string that got passed into a method by ref but i
want to see how many other places that string is refered to is this
possible?
Nov 16 '05 #1
3 1052
The fact that it was passed by-ref really doesn't matter, since strings are
always referenced implicitly. As for finding the graph of references you'd
have to use some of the profiling and possibly hosting APIs. That information
is simply not available from within the managed environment.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"Daniel" <so*******************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
ok so lets say i have a string that got passed into a method by ref but i
want to see how many other places that string is refered to is this
possible?

Nov 16 '05 #2
Let me clarify that a bit, reference passed strings do update the parameter
when they are returned, so there is some difference. The same with an out
classified string. I'll try and put together some code to clarify this a bit
better.

The information on finding the reference graph remains the same though.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:ea*************@TK2MSFTNGP15.phx.gbl...
The fact that it was passed by-ref really doesn't matter, since strings are
always referenced implicitly. As for finding the graph of references you'd
have to use some of the profiling and possibly hosting APIs. That information
is simply not available from within the managed environment.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"Daniel" <so*******************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
ok so lets say i have a string that got passed into a method by ref but i
want to see how many other places that string is refered to is this
possible?


Nov 16 '05 #3
Justin Rogers <Ju****@games4dotnet.com> wrote:
Let me clarify that a bit, reference passed strings do update the parameter
when they are returned, so there is some difference. The same with an out
classified string. I'll try and put together some code to clarify this a bit
better.


Hopefully the following gives enough examples to make it clear:
http://www.pobox.com/~skeet/csharp/parameters.html

In this context, string is just a reference type like any other, and it
happens to be immutable.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

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

Similar topics

7
5896
by: Brian | last post by:
Anyone worked with Verisign's Payflow Pro object in ASP? We've had it up and running for weeks without a problem and recently we've started to get some undesirable behavior: at the point where the...
6
8261
by: John Bentley | last post by:
John Bentley writes at this level: If we think about our savings accounts then division never comes in (as far as I can see). We deposit and withdraw exact amounts most of the time. Occasionaly...
0
2203
by: Kenneth Baltrinic | last post by:
I am getting the following error when deserializing an object that has a couple of dozen dependant objects in its object graph. Anyone who can suggest where I might begin to look to resolve problem...
1
1220
by: Daniel | last post by:
ok so lets say i have a string that got passed into a method by ref but i want to see how many other places that string is refered to is this possible?
0
2325
by: Lyn | last post by:
I am having a frustrating time trying to do a simple insert of a BMP picture into a Bound Object Frame using both VBA and the Insert | Object... dialog. I had a separate post thread going on this...
0
941
by: Naman Sud | last post by:
Hi, I am unable to run excel application in ASP.net. I have used the com reference of object library 9.0 in WIndows 2000. Its generate the access denied error for the aspnet user. When I tried to...
9
6816
by: mike | last post by:
I have this script executing <script> function mike_test(event) { x = window.event.clientX; alert(x); } </script> <iframe src="blank.html" id="my_iframe1"> </iframe>
26
5634
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
11
1924
by: emailscotta | last post by:
Below I declared a basic object literal with 2 methods. The "doSomething" method is call from the "useDoSomething" method but the call is only sucessful if I use the "this" keyword or qualify the...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7366
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...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.