Solved

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

Posted on 2004-09-23
1
975 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
1 Comment
 
LVL 19

Accepted Solution

by:
drichards earned 50 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now