Click here to Skip to main content
15,897,718 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataSet Pin
Assaf829-Sep-07 8:17
Assaf829-Sep-07 8:17 
AnswerRe: DataSet Pin
Giorgi Dalakishvili9-Sep-07 8:08
mentorGiorgi Dalakishvili9-Sep-07 8:08 
QuestionRe: DataSet Pin
Assaf829-Sep-07 8:40
Assaf829-Sep-07 8:40 
Questionremote access Pin
mkaraoglan9-Sep-07 4:18
mkaraoglan9-Sep-07 4:18 
AnswerRe: remote access Pin
Ermak869-Sep-07 4:34
Ermak869-Sep-07 4:34 
QuestionDataGidView Pin
Assaf829-Sep-07 4:16
Assaf829-Sep-07 4:16 
QuestionCompare listview item Pin
andredani9-Sep-07 3:22
andredani9-Sep-07 3:22 
AnswerRe: Compare listview item Pin
Mark F.9-Sep-07 11:18
Mark F.9-Sep-07 11:18 
It depends on whether or not you are comparing strings or the date/time values. With strings you can obtain the item's text (Item[n].Subitems[0].Text) at that desired index (n) in each of the the listviews. Then compare the strings.
if( String.Compare(str1, str2) == 0)
{
  // do something useful...,
}

OR...,

if (CultureInfo.CurrentCulture.CompareInfo.Compare(str1, str2,
       CompareOptions.IgnoreCase) == 0)
   {
      // do something useful...,
   }
If you are checking the date/time. You need to convert the string to DateTime format then check it using:
DateTime t1 = DateTime.Parse("2007-09-09 21:44:21",
                       CultureInfo.InvariantCulture.DateTimeFormat);
DateTime t2 = DateTime.Parse("2007-09-09 19:24:20",
                       CultureInfo.InvariantCulture.DateTimeFormat);

if (DateTime.Compare(t1, t2) > 0)
    Console.WriteLine("t1 > t2");
if (DateTime.Compare(t1, t2) == 0)
    Console.WriteLine("t1 == t2");
if (DateTime.Compare(t1, t2) < 0)
    Console.WriteLine("t1 < t2");
Of course the time date string does not have to be a literal.


Mark
GeneralRe: Compare listview item Pin
andredani10-Sep-07 0:37
andredani10-Sep-07 0:37 
GeneralRe: Compare listview item Pin
Mark F.10-Sep-07 3:40
Mark F.10-Sep-07 3:40 
GeneralRe: Compare listview item Pin
andredani10-Sep-07 4:17
andredani10-Sep-07 4:17 
QuestionProblem with LDF files ( database log file ) Pin
Developer6119-Sep-07 2:20
Developer6119-Sep-07 2:20 
QuestionHow to display # using / and % Pin
programming1019-Sep-07 2:16
programming1019-Sep-07 2:16 
AnswerRe: How to display # using / and % Pin
Christian Graus9-Sep-07 2:33
protectorChristian Graus9-Sep-07 2:33 
AnswerRe: How to display # using / and % [modified] Pin
Julian Nicholls9-Sep-07 2:48
Julian Nicholls9-Sep-07 2:48 
QuestionCreating textboxes Pin
garga19-Sep-07 0:40
garga19-Sep-07 0:40 
AnswerRe: Creating textboxes Pin
Giorgi Dalakishvili9-Sep-07 1:07
mentorGiorgi Dalakishvili9-Sep-07 1:07 
Questiondrag and drop in datagridview??????? Pin
San@Coding9-Sep-07 0:14
San@Coding9-Sep-07 0:14 
Questionhow can send a Unicode message with "at command" and gsm ? Pin
B.A8-Sep-07 21:42
B.A8-Sep-07 21:42 
AnswerRe: how can send a Unicode message with "at command" and gsm ? Pin
Giorgi Dalakishvili8-Sep-07 23:34
mentorGiorgi Dalakishvili8-Sep-07 23:34 
GeneralRe: how can send a Unicode message with "at command" and gsm ? Pin
B.A9-Sep-07 19:18
B.A9-Sep-07 19:18 
GeneralRe: how can send a Unicode message with "at command" and gsm ? Pin
Giorgi Dalakishvili9-Sep-07 20:36
mentorGiorgi Dalakishvili9-Sep-07 20:36 
QuestionKey Presses Pin
ahojed8-Sep-07 21:00
ahojed8-Sep-07 21:00 
AnswerRe: Key Presses Pin
Ermak868-Sep-07 22:50
Ermak868-Sep-07 22:50 
AnswerRe: Key Presses Pin
Giorgi Dalakishvili8-Sep-07 23:23
mentorGiorgi Dalakishvili8-Sep-07 23:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.