Click here to Skip to main content
15,892,643 members
Home / Discussions / C#
   

C#

 
AnswerRe: Closing a exe file Pin
Nuri Ismail18-Feb-09 3:08
Nuri Ismail18-Feb-09 3:08 
GeneralRe: Closing a exe file Pin
mrithula818-Feb-09 18:11
mrithula818-Feb-09 18:11 
GeneralRe: Closing a exe file [modified] Pin
Nuri Ismail18-Feb-09 21:49
Nuri Ismail18-Feb-09 21:49 
GeneralRe: Closing a exe file Pin
mrithula818-Feb-09 23:11
mrithula818-Feb-09 23:11 
GeneralRe: Closing a exe file Pin
Nuri Ismail18-Feb-09 23:14
Nuri Ismail18-Feb-09 23:14 
Questiondraw a line similar to the one present in ms word Pin
sabeel alwosol18-Feb-09 2:59
sabeel alwosol18-Feb-09 2:59 
AnswerRe: draw a line similar to the one present in ms word Pin
Thomas Stockwell18-Feb-09 4:22
professionalThomas Stockwell18-Feb-09 4:22 
QuestionCompare file length and lines of data in 2 files inside a zip file Pin
Member 322226418-Feb-09 2:56
Member 322226418-Feb-09 2:56 
Please help me to compare the length and lines of data in 2 files which are inside a zip file.

File2:Will have details about the each file length which is inside the zip file


File1-Any file .dat file

File2-MRR_GIQ_FR_X03_M0808_STATS.dat


using System.Text;
using System.IO;
using System.IO.Compression;


namespace ConsoleApplication1
{
class Class1
{
public bool splitFile = false;
string srcFile = "C:\\SampleFile\\MRR_Files.zip";


static void Main(string[] args)
{
TestDecompress();

}
private bool FileCompare(string file1, string file2)
{
int file1byte;
int file2byte;
FileStream fs1;
FileStream fs2;




// Determine if the same file was referenced two times.
if (file1 == file2)
{
// Return true to indicate that the files are the same.
return true;
}

// Open the two files.
fs1 = new FileStream(file1, FileMode.Open);
fs2 = new FileStream(file2, FileMode.Open);

// Check the file sizes. If they are not the same, the files
// are not the same.
//if (fs1.Length != fs2.Length)
//{
// // Close the file
// fs1.Close();
// fs2.Close();

// // Return false to indicate files are different
// return false;
//}

// Read and compare a byte from each file until either a
// non-matching set of bytes is found or until the end of
// file1 is reached.
do
{
// Read one byte from each file.
file1byte = fs1.ReadByte();
file2byte = fs2.ReadByte();
}
while ((file1byte == file2byte) && (file1byte != -1));

// Close the files.
fs1.Close();
fs2.Close();

// Return the success of the comparison. "file1byte" is
// equal to "file2byte" at this point only if the files are
// the same.
return ((file1byte - file2byte) == 0);
}
AnswerRe: Compare file length and lines of data in 2 files inside a zip file Pin
Deresen18-Feb-09 4:03
Deresen18-Feb-09 4:03 
QuestionCross domain AD search Pin
NanaAM18-Feb-09 2:03
NanaAM18-Feb-09 2:03 
QuestionUnwanted Dash in HTTP request string Pin
cfoxtrot18-Feb-09 1:44
cfoxtrot18-Feb-09 1:44 
QuestionUsing PowerPoint Application in .net Pin
nameen18-Feb-09 1:06
nameen18-Feb-09 1:06 
Questiondrawing lines at runtime Pin
maisa.z18-Feb-09 0:30
maisa.z18-Feb-09 0:30 
AnswerRe: drawing lines at runtime Pin
J4amieC18-Feb-09 0:41
J4amieC18-Feb-09 0:41 
AnswerRe: drawing lines at runtime Pin
dan!sh 18-Feb-09 2:15
professional dan!sh 18-Feb-09 2:15 
QuestionFinding controls in datagridview dynamically Pin
Nitin K17-Feb-09 23:52
Nitin K17-Feb-09 23:52 
AnswerRe: Finding controls in datagridview dynamically Pin
Calin Tatar18-Feb-09 0:50
Calin Tatar18-Feb-09 0:50 
GeneralRe: Finding controls in datagridview dynamically Pin
Nitin K18-Feb-09 2:20
Nitin K18-Feb-09 2:20 
GeneralRe: Finding controls in datagridview dynamically Pin
Calin Tatar18-Feb-09 2:26
Calin Tatar18-Feb-09 2:26 
GeneralRe: Finding controls in datagridview dynamically Pin
Calin Tatar18-Feb-09 2:35
Calin Tatar18-Feb-09 2:35 
QuestionVisual Studio Setup Project, how to make sure files are overwritten. Pin
^mrc^17-Feb-09 23:41
^mrc^17-Feb-09 23:41 
AnswerRe: Visual Studio Setup Project, how to make sure files are overwritten. Pin
Mirko198018-Feb-09 0:02
Mirko198018-Feb-09 0:02 
QuestionHow to set user-defined-type as Oracle SP input parameter in .NET Pin
AnilJayanti17-Feb-09 23:19
AnilJayanti17-Feb-09 23:19 
AnswerRe: How to set user-defined-type as Oracle SP input parameter in .NET Pin
ABitSmart18-Feb-09 0:46
ABitSmart18-Feb-09 0:46 
AnswerHow to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
AnilJayanti18-Feb-09 22:09
AnilJayanti18-Feb-09 22:09 

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.