Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Comparing C# strings.

Posted on 2006-12-01
2
Medium Priority
?
253 Views
Last Modified: 2010-04-16
I have if (String2LookIn == "about:blank") return "";
What is the appropriate way to compare this string?

0
Comment
Question by:mathieu_cupryk
2 Comments
 
LVL 29

Accepted Solution

by:
Nightman earned 1000 total points
ID: 18053594
That looks fine to me. What are you concerned about?
0
 
LVL 7

Expert Comment

by:nepali
ID: 18053672
comparison is fine.. but its better to return string.Empty than a zero length string..
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

972 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