Click here to Skip to main content
15,904,339 members
Home / Discussions / C#
   

C#

 
GeneralDatabase Wrapper Pin
JohnMess10-May-04 5:25
sussJohnMess10-May-04 5:25 
GeneralRe: Database Wrapper Pin
Heath Stewart10-May-04 5:40
protectorHeath Stewart10-May-04 5:40 
GeneralRe: Database Wrapper Pin
johnmess10-May-04 6:31
sussjohnmess10-May-04 6:31 
QuestionImage retrieval from ImageList is slow? Pin
Judah Gabriel Himango10-May-04 4:39
sponsorJudah Gabriel Himango10-May-04 4:39 
AnswerRe: Image retrieval from ImageList is slow? Pin
Heath Stewart10-May-04 4:47
protectorHeath Stewart10-May-04 4:47 
GeneralRe: Image retrieval from ImageList is slow? Pin
Judah Gabriel Himango10-May-04 4:53
sponsorJudah Gabriel Himango10-May-04 4:53 
GeneralRe: Image retrieval from ImageList is slow? Pin
Judah Gabriel Himango10-May-04 6:19
sponsorJudah Gabriel Himango10-May-04 6:19 
GeneralRe: Image retrieval from ImageList is slow? Pin
leppie10-May-04 11:55
leppie10-May-04 11:55 
Generaljumping from one form to another Pin
michael.wikstrom10-May-04 3:29
michael.wikstrom10-May-04 3:29 
GeneralRe: jumping from one form to another Pin
Heath Stewart10-May-04 3:35
protectorHeath Stewart10-May-04 3:35 
GeneralSending binary data with webservices Pin
Edgar R. C.10-May-04 3:01
Edgar R. C.10-May-04 3:01 
GeneralRe: Sending binary data with webservices Pin
Heath Stewart10-May-04 3:09
protectorHeath Stewart10-May-04 3:09 
GeneralRe: Sending binary data with webservices Pin
Edgar R. C.10-May-04 3:57
Edgar R. C.10-May-04 3:57 
GeneralRe: Sending binary data with webservices Pin
Heath Stewart10-May-04 4:30
protectorHeath Stewart10-May-04 4:30 
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 

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.