How to compare two strings with out Case sensitive ?
Answers were Sorted based on User's Feedback
Answer / minhajul islam
string str1="Hello1";
string str2="Hello2";
String.Compare(str1,str2,true)
//true if you want compare two string without case
sensative and false if you want to case sensative.
//It will return Zero if compare as equal and 1 if not.
| Is This Answer Correct ? | 16 Yes | 2 No |
Answer / navin.cp
Here is the code that solve ur problem:
string str = "virtual";
if (str.Equals("virtual"))
{
// your code here....
}
| Is This Answer Correct ? | 8 Yes | 6 No |
Answer / manu
with
String.Compare(string a,string b) [result 0 only when it
is equal- since it compares by subtracting ascii of b from
ascci of a)
or
String.Equals(string a,string b) {true if it is equal]
we can achieve the same
| Is This Answer Correct ? | 5 Yes | 6 No |
Answer / sekar thangavel
sting.Equals(string a,string b)
Explanation:
Determines whether two specified system.string objects have
the same values,a parameter specifies the culture,case and
sort rules used in the comparison
| Is This Answer Correct ? | 4 Yes | 7 No |
What is the difference between session and viewstate?
List of words of preprocessor in .net?
Mention the namespace that is used to include .net data provider for sql server in .net code?
How to write test case (Unit test plan)
How response object is related to asp's response object?
4. How do you plan to achieve these goals?
7 Answers Burger King, Latest, Swatz Oils,
Explain autherization levels in .net ?
To which class you load XML or Related Data
What is Runtime callable wrapper?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
Describe SOA and the tenets of it?
What are the major differences between asp.net1.1 and asp.net 2.0?
8 Answers CTS, Deloitte, Mphasis, Vison,
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)