references

.Net: Nested References

How smart is Garbage Collection when it comes to nested references? Take this code for example: Public Class SomeClass Private m_SomeOtherClass(Me) End Class I know that GC works by looking at how many references remain, and any object without any references ends up getting dumped. So in this case, where there's a reference comi...

Track all object references in C#

Is it possible to list all references of an object, while debugging in Visual Studio. I am using C#. I am looking for something similar to what GC does during garbage collection. ...

Are there any good resources for microsoft multipoint sdk development?

hi guys, i just manage to get myself in a tight spot, it seems our company is playing with the idea of developing a microsoft multipoint app, and the funny thing is that we're not really much of a .net developer, as we're mostly just LAMP guys with Perl. and to top it off, i need to provide some estimate to my boss about how long develo...

How do you reference a C# project from a C++/CLi project in same solution

I have two projects in a solution, one is a C# library and the other is a C++/CLI library. I have added a reference in the C++/CLI project using the references menu to the c# library. I then add the #using <assembly.name.dll> and try to reference the assembly with using namespace namspace.subnamespace; But i get the error that t...

Why are references not reseatable in C++

Hi, C++ references have two properties: They always point to the same object. They can not be 0. Pointers are the opposite: They can point to different objects. They can be 0. Why is there no "non-nullable, reseatable reference or pointer" in C++? I can't think of a good reason why references shouldn't be reseatable. Edit: The ...

Mutable Value Objects / Sharing State (and beer brewing!)

I'm a rusty programmer attempting to become learned in the field again. I've discovered, fitfully, that my self-taught and formal education both induced some bad habits. As such, I'm trying to get my mind around good design patterns, and -- by extension -- when they're wrong. The language is Java, and here's my issue: I'm attempting to ...

VS2008 web site references

I have a web site project in vs2008. When you add a reference to a dll, it simply copies the dll into the bin directory. I do not like to check in the bin directory into version control. Any ideas on how to make the reference work without converting to a web application (I'm just doing maintenance on an existing site). ...

Must I use pointers for my C++ class fields?

After reading a question on the difference between pointers and references, I decided that I'd like to use references instead of pointers for my class fields. However it seems that this is not possible, because they cannot be declared uninitialized (right?). In the particular scenario I'm working on right now, I don't want to use normal...

C++ functions accepting both pointers and references

I am writing a library in C++ and have some functions that work with modules. An example would look like this: void connect(Module *a, Module *b); The problem is, that it would be sometimes handy if the function accepted also references (some of the Modules may be allocated on the stack and some on the heap and all the &s and *s get b...

Is there a good list of things left out of the Compact Framework?

I'm looking for a list of things left out of the Compact Framework, so I don't have to stumble over each one. For instance, I've just discovered the Message struct is not directly available. No big deal, but I spent an hour thinking I had done something wrong, since all the compiler says is "Are you missing a using statement?". ...

Difference between references and pointers

duplicate: Difference between pointer variable and reference variable in C++ What does Class& mean in c++ and how is it different from Class*? Class& foo; Class* foo; ...

How to overcome same type in two namespaces, System.Linq.Expressions.Expression<TDelegate>?

I am defining some Expression variables in my app and need to have a reference to Microsoft.Scripting.Core. That assembly includes the same namespace as the System.Core assembly from the main .Net framework. I want to use the defintions from the System.Core assembly as it's stable whereas the Microsoft.Scripting.Core is alpha. How do I...

Am I initializing my C++ reference variables correctly?

I've tried to Google this issue, and I can't find anything that I see as relevant. So I must be looking for the wrong thing; none the less, I'd appreciate some advice... Foobar &foobar = *new Foobar(someArg, anotherArg); Is it just me or does that seem smelly? I understand that the new keyword is designed for use with pointers (as su...

Is the practice of returning a C++ reference variable, evil?

This is a little subjective I think; I'm not sure if the opinion will be unanimous (I've seen a lot of code snippets where references are returned). According to a comment toward this question I just asked, regarding initializing references, returning a reference can be evil because, [as I understand] it makes it easier to miss deleting...

Storing references to DOM elements

In a particular script I'm writing, I have a number of objects which are linked to some DOM Elements. Given that each element has a unique id, should each object keep just the element's id (and use document.getElementById each time), or store the element in a property? Here's a simplified example of what I mean: function myThing(elId) ...

the get() function for java hashmaps

Hi, I've declared the following hashmap: HashMap<Integer, Hive> hives Where Hive is an object. If I call "hives.get(2)" will it return a copy of the object Hive at that location or a reference to it? My goal is to modify the Hive object at that location. If it returns the reference, I can just modify the returned hive and be don...

What references does Visual Studio add when I accidentally click Add New Winform?

Strangely enough, this is not on The Google. And I could really use a list so I know which ones I need to remove. ...

Passing a reference to a (large) data area across a socket

I have been reading the descriptions of referencing in Java, and, while I feel I understand them, I am not sure if Java allows me to do the following: we have two threads in the same JVM communicating via sockets, and we would like to pass what is essentially the address of a large chunk of data across the socket, without copying the dat...

Custom Wizard: Is it possible to add a dll reference to a project on creation from a custom wizard?

Hello, I was wondering if anyone could tell me if what I'm trying to accomplish is possible. I am using C# in VS 2008. I have two project templates and another template which links the two projects and calls their templates. The first project is a user control and the second is a test app that needs to reference the user control. I ...

Which is better, return value or out parameter?

If we want to get a value from a method, we can use either return value, like this: public int GetValue(); or: public void GetValue(out int x); I don't really understand the differences between them, and so, don't know which is better. Can you explain me this? Thank you. ...