473,657 Members | 2,316 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 1056
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.c om> wrote in message
news:Oj******** ******@tk2msftn gp13.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****@games4d otnet.com> wrote in message
news:ea******** *****@TK2MSFTNG P15.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.c om> wrote in message
news:Oj******** ******@tk2msftn gp13.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****@games4d otnet.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.co m>
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
5904
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 component sends the transaction data, about 1 in 4 times it will go through, but otherwise it will sit and spin until the script or the browser session times out. may or may not be related to a server maintenance change. I'm not a server...
6
8299
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 we get an interest payment. Unless the bank is cruel to its developers the interest figure will be able to be exactly represented by a computer, something like 4.1% as opposed to 4 1/3 % 125.78 * ' Initial Balance 04.1% -------
0
2221
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 I would greatly in debted to. Serializing the object works fine. When I try to deserialize it, I get the following error: A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll Additional...
1
1231
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
2337
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 and closed it off when I thought I had resolved the problem, but now I am back at square one. So I thought I would start afresh with a new post. Here is the problem... A few months ago, I set up a Bound Object Frame on a form which was tied to...
0
948
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 resolved this by using Dconfig although this error is gone but another error of invalid clsID or its not registered is thrown via system.runtime.interopservices. PLEASE HELP IN THIS REGARD ITS VERY-2 URGENT as mine whole functionality depends on...
9
6834
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
5667
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 several parts of the DOM, but this does not include the window object. Thank you
11
1953
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 call with "SomeObj". Can someone describe why this is happening? var SomeObj = { doSomething : function() {
0
8411
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8613
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2740
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 we have to send another system
2
1969
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.