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

C#

 
GeneralRe: Sending binary data with webservices Pin
Edgar R. C.11-May-04 9:27
Edgar R. C.11-May-04 9:27 
GeneralRe: Sending binary data with webservices Pin
Heath Stewart10-May-04 4:39
protectorHeath Stewart10-May-04 4:39 
QuestionINT Declarations? Pin
Anonymous10-May-04 2:41
Anonymous10-May-04 2:41 
AnswerRe: INT Declarations? Pin
Heath Stewart10-May-04 2:55
protectorHeath Stewart10-May-04 2:55 
GeneralC# Builder Pin
sreejith ss nair10-May-04 1:01
sreejith ss nair10-May-04 1:01 
GeneralRe: C# Builder Pin
Heath Stewart10-May-04 2:36
protectorHeath Stewart10-May-04 2:36 
QuestionHow to compare the file? Pin
m7779-May-04 22:37
m7779-May-04 22:37 
AnswerRe: How to compare the file? Pin
Heath Stewart10-May-04 2:52
protectorHeath Stewart10-May-04 2:52 
Comparing files isn't something for beginners. Start basic. If you don't already know the types of pattern matching algorithms for comparing text files, then do it the easy way. Redirect the output from a new Process you can create using the FC command or various console-based diff tools out there, like that in cygwin[^] ('diff').

A .NET console application that wraps the FC command (it's not an application, but an interpreted command in the command shell) would look like this:
using System;
using System.Diagnostics;

public class Diff
{
  static void Main(string[] args)
  {
    if (args.Length != 2)
    {
      Console.Error.WriteLine("You must provide two filenames.");
      Environment.Exit(1);
    }

    string cmd = "cmd.exe";
    if (Environment.OSVersion.Platform == PlatformID.Win32Windows)
      cmd = "command.exe";

    Process p = new Process();
    p.StartInfo.UseShellExecute = false;
    p.StartInfo.RedirectStandardOutput = true;
    p.StartInfo.FileName = cmd;
    p.StartInfo.Arguments = string.Format(
      @"/c fc ""{0}"" ""{1}""", args[0], args[1]);
    p.Start();
    p.WaitForExit();

    string line = p.StandardOutput.ReadLine();
    while (line != null)
    {
      Console.WriteLine(line);
      line = p.StandardOutput.ReadLine();
    }
  }
}
If you're interested in actual text diff'ing, there are projects on SourceForge[^] where you can browse the source, as well as otherplaces with open source code for utilities like diff. It's not something easy to cover in a forum.

Some books on programming algorithms will have this information as well.

 

Microsoft MVP, Visual C#
My Articles
Questionhow to invoke API function which has pointer param ? Pin
fu09-May-04 21:58
fu09-May-04 21:58 
AnswerRe: how to invoke API function which has pointer param ? Pin
Mazdak9-May-04 22:41
Mazdak9-May-04 22:41 
AnswerRe: how to invoke API function which has pointer param ? Pin
Mazdak9-May-04 22:48
Mazdak9-May-04 22:48 
AnswerRe: how to invoke API function which has pointer param ? Pin
Heath Stewart10-May-04 3:04
protectorHeath Stewart10-May-04 3:04 
AnswerRe: how to invoke API function which has pointer param ? Pin
fu011-May-04 17:24
fu011-May-04 17:24 
GeneralLogon Problem using DataSets with Crsytal Reports Pin
AAQ9-May-04 21:07
AAQ9-May-04 21:07 
GeneralRe: Logon Problem using DataSets with Crsytal Reports Pin
Mazdak9-May-04 21:49
Mazdak9-May-04 21:49 
Generalcreating a form at runtime Pin
cristina_tudor9-May-04 20:25
cristina_tudor9-May-04 20:25 
GeneralRe: creating a form at runtime Pin
Stefan Troschuetz9-May-04 21:18
Stefan Troschuetz9-May-04 21:18 
GeneralRe: creating a form at runtime Pin
Heath Stewart10-May-04 3:15
protectorHeath Stewart10-May-04 3:15 
GeneralSearching Text in a RichTextBox Pin
myNameIsRon9-May-04 19:09
myNameIsRon9-May-04 19:09 
GeneralRe: Searching Text in a RichTextBox Pin
Aryadip9-May-04 21:31
Aryadip9-May-04 21:31 
GeneralRe: Searching Text in a RichTextBox Pin
myNameIsRon10-May-04 13:50
myNameIsRon10-May-04 13:50 
QuestionNT / LM Hash? Pin
RhysMG9-May-04 18:43
RhysMG9-May-04 18:43 
AnswerRe: NT / LM Hash? Pin
Heath Stewart10-May-04 3:28
protectorHeath Stewart10-May-04 3:28 
GeneralRe: NT / LM Hash? Pin
10-May-04 10:27
suss10-May-04 10:27 
GeneralRe: NT / LM Hash? Pin
Heath Stewart10-May-04 10:48
protectorHeath Stewart10-May-04 10:48 

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.