473,799 Members | 3,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

is vs = [and] is not vs <>

125 New Member
Ok I'm witing VB in VS 2005.

And got some errors when i used "is" that i fixed by replasing is with "=". It was in a comparison of string variable and a string.

So whats the difference?, are the operator overloaded different, what is the best way of knowing witch to use.
Aug 14 '08 #1
1 946
Plater
7,872 Recognized Expert Expert
"is" is used to compare object types, not values. The = operator (== in normal languages) or string.Equals() are the way to compare strings for equality in .NET
Aug 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
4341
by: Piotre Ugrumov | last post by:
I have tried to implement the overload of these 2 operators. ostream & operator<<(ostream &out, Person &p){ out<<p.getName()<<" "<<p.getSurname()<<", "<<p.getDateOfBirth()<<endl; return out; } This overload work but I have a curiosty If I try to approch to the name or to the surname or to the dateofbirth in this way i receive error: ostream & operator<<(ostream &out, Person &p){ out<<p.name<<" "<<p.surname<<", "<<p.dateofbirth<<endl;
3
2249
by: Piotre Ugrumov | last post by:
I have done the overload on the operator >> and << in the class Attore. These 2 overload work correctly. I have done the overload of the same overload in the class Film. The class film ha inside an array of pointer to Attore. I have written these overload in these ways. the overload of << work correctly the overload of >> I don't know. I compile the class correctly, when I insert a film through the operator >> I don't receive error, but...
10
1682
by: Christopher Benson-Manica | last post by:
Sorry for the lame title, but it's hard to condense what I'm about to say... Here's my situation (my first real C++ situation, yay!). Currently we have a MyTCPThread (don't let the name scare you, this isn't OT) that has a socket member object that has methods Send() and GetLine() for sending and receiving data. I want to subclass MyTCPThread so I can use << and >> as wrappers for Send() and GetLine() (Send() is my primary concern at the...
8
1473
by: Christopher Benson-Manica | last post by:
I know I keep asking similar questions, but I really want to do this at least sort of right. Not to mention I got no on-group replies to my previous post :( I desperately want an interface that can allow classes that implement it to act sort of like streams, but I just can't seem to get everything I want... class Writable { protected: ostringstream outbuf; // or should I use private inheritance?
3
1500
by: TJ | last post by:
Hi, I've been referring to many codes and books and always see that the stream insertion operators are overloaded as friends. Why is that? Are there any other overloading that need the same type of specification, as friends in the class that will use them? Thanks, TJ
7
4758
by: Tony | last post by:
I'm using XmlTextWriter to write XML to a string and XmlDocument to read it back. Every thing works OK except if my data contains a < or >. If this is the case they get saved as < > repectively. When I come to read them back they appear as the text < > rather than the < and >. What do I have to do to prevent this happening. Similarly if I try and save data <abc> I get an exception saying potentially dangerous data detected
1
1328
by: seeCoolGuy | last post by:
I've been using Access to import some data straight into a sql server database by simply importing the xml file. However lately some of the newer xml files will contain vaild data such as "m<sup>3</sup>" within the tags so it reads like the following <TblPartDesriptions_to_translate> <intpartid>79</intpartid> <strpartdescription>Part Description Here</strpartdescription> <strlongdescription>some really long text here
0
1714
by: Tony | last post by:
I want to display the text of items in a bulletedlist on multiple lines, but I can't get it working. Here is a sample version of my code below: protected void blStaff_DataBound(object sender, EventArgs e) { foreach (ListItem lstItem in ((BulletedList)sender).Items) { lstItem.Text = "A" + "<br>" + "B"; } }
3
1972
by: Eric | last post by:
I'm trying to build a mailto url like so: <td class="{$sData}"><!]><xsl:value-of select="email"/><!]><xsl:value-of select="email"/><!]></td> The html that's rendered looks like I would expect my html source to, however in the source there are &lt; and &gt; chraracters so my links don't work. Any way to get it to just spit out what I have onto the page?
4
1490
by: rengaraj | last post by:
Sir / Mam, I can replace < with &lt; or &60# and 62 for > But, If i need the following text <code># include <stdio.h> </code> i will write as <code># include &lt; stido.h &gt;</code> it displays as
0
9685
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
10249
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...
1
10219
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10025
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
9068
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...
1
7563
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5584
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4138
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
3755
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.