Solved

c# If textbox1.text = textbox2.text erk!!!

Posted on 2004-09-23
1
1,047 Views
Last Modified: 2012-06-21
ARG!!! Bloody c# and it's odd functions... I remember the days in VB when you could do

[code]
If textbox1.text = textbox2.text then
 'do some funny things
else
 'do something else
end if
[/code]

But you can't in C#... any one got any ideas?

Cheers,
0
Comment
Question by:reclusive
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
drichards earned 50 total points
ID: 12135870
C# syntax is more like Java/C++ than VB:

if ( textBox1.Text.Equals(textBox2.Text) )
{
   // do stuff
}
else
{
   // other stuff
}

or


if ( textBox1.Text == textBox2.Text )
{
   // do stuff
}
else
{
   // other stuff
}
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question