Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-09-23
1
Medium Priority
?
1,059 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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

705 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