473,386 Members | 1,706 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,386 software developers and data experts.

Pointer Comparision

I know this should be simple but I can't find it.

Dim A as new object
Dim B as object
B = A

Do Bunch of stuff

Check if B still = A

This is basically pointer comparision in C++ days. how do I check that
A and B still point to the same object?

Chris
Nov 21 '05 #1
2 1012
I Don't Like Spam wrote:
I know this should be simple but I can't find it.

Dim A as new object
Dim B as object
B = A

Do Bunch of stuff

Check if B still = A

This is basically pointer comparision in C++ days. how do I check that
A and B still point to the same object?

Chris


I knew I knew it.

If B is A then

end if

Chris
Nov 21 '05 #2
"I Don't Like Spam" <no@spam.com> schrieb:
Dim A as new object
Dim B as object
B = A

Do Bunch of stuff

Check if B still = A

This is basically pointer comparision in C++ days. how do I check that A
and B still point to the same object?


While the '=' operator is used to assign references, the 'Is' operator is
used to test for object identity (reference equality):

\\\

' Check for reference-equality.
If A Is B Then...

' Check for reference-inequality.
If Not A Is B Then...
If A IsNot B Then... ' VB 2005 only!
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

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

Similar topics

2
by: Florian Lindner | last post by:
Hello, I've read the chapter in the Python documentation, but I'm interested in a a more in-depth comparision. Especially regarding how pythonic it is and how well it performs and looks under...
5
by: Tommy Lang | last post by:
Hi! I am trying to write a function that goes through an array of objects(class Student) and checks if object name(student name)matches search string(char *). I want the function to return a...
1
by: John Black | last post by:
Hi, In using find_if() you need to name a comparision function which normally is a static function, but sometimes it is really inconvinient for this, let's take this example, class MyClass{...
3
by: John Black | last post by:
Hi, I have 2 vectors, vector<Derived_class*> vec1, vec2; can I do the following, for (int i=0; i<vec1.size(); ++i){ for (int j=0; j<vec2.size(); ++j){ if (.. some comparision of vec1 and...
10
by: techie | last post by:
I'm creating a class BookType that will store information about books. Each book type can have up to 4 authors. I defined a new type for an array of char: typedef char array4_t; This will...
2
by: Ashwin Kambli | last post by:
Hi, I am doing a study on the performance comparision of C# and Java. Links to any articles on this topic will be greatly appreciated. Thanking you, Ashwin
3
by: kd | last post by:
Hi All, How to perform case-insensitive comparision of strings? Would there be some kind of an indicator, which when set to true, would allow case-insenitive comparision of strings using...
2
by: nirav.lulla | last post by:
I have been given the task to come up with Requirements, Comparision and Migration document from Shadow Direct to DB2 Connect. I am very new much to all this, but kind of know a little bit about...
3
by: abctech | last post by:
I have an Html page, user enters a Date (dd-mm-yyyy) here. There's a servlet connected in the backend for processing this submitted information, it must have a method to compare this entered date...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...

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.