Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have two strings ds,ds1 like as

C#
string ds,ds1;


maintain relation as

C#
if(ds1>=ds)
{

}

but raise the error like as

operters can not applied for string

please help me.

thank u
Posted
Comments
Mathi Mani 23-Jun-15 14:42pm    
Yes, >= operator cannot be applied to string and string. What are you trying to achieve?
[no name] 23-Jun-15 14:46pm    
http://www.codeproject.com/Answers/1003419/how-can-u-write-the-specific-statement-for-double#answer2

Maybe you should really do it.
Sergey Alexandrovich Kryukov 23-Jun-15 16:26pm    
What is the purpose of comparing strings? What do you think is the definition of "no less" order relationship between strings?
—SA

 
Share this answer
 
Comments
CPallini 23-Jun-15 15:22pm    
5.
ZurdoDev 23-Jun-15 15:42pm    
I suggest posting at least some description to explain why the link is a solution.
you cannot compare for two string by that operator. If you want to compare the length or compare equal, my solution is find the method support compare two string in C#
read msdn here

eg
C#
string MyString = "Hello World!";
Console.WriteLine(String.Compare(MyString, "Hello World?"));
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900