ZopoStyle

Hi,

I need to implement a function just like Source safe's "Show Difference" function...

Does anyone has something similar or already done to do that

I need to show the differences just like source safe does.... But it must be in a windows forms, and in web form...

Thanks




Re: Visual C# General Show differences

Figo Fei - MSFT

Hi, Zopo

You meant to compare the content of two files

You could first use StreamReader to read out these two files into two strings respectively. (eg. StreamReader sr = new StreamReader(@"C:\source1.txt"))

Then use string.Compare method to check the difference.

If I've misunderstood you, please point it out.

Thanks






Re: Visual C# General Show differences

ZopoStyle

This method I know....but I need to show to user the differences.... like...print the entire row in red....just like source safe..




Re: Visual C# General Show differences

Figo Fei - MSFT

Hi,

Well, so you could compare the text line by line, and to retrieve the different lines.

Thanks






Re: Visual C# General Show differences

ZopoStyle

But let's supose that the text contains 25 lines in one paragraph without \r\n how I'm suppose to compare...

What delimiter I have to use to brake each line






Re: Visual C# General Show differences


Re: Visual C# General Show differences

ZopoStyle

THANKS !!!

That's exactly what I'm looking foward...