Solved

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

Posted on 2004-09-23
1
1,001 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
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Media.Imaging 1 18
Finally almost got it 5 36
Problem!!! 8 33
Following an example - Why do I need to click Save button twice? 3 25
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

786 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