|
WinDiff does the job. It is shipped with the Platform SDK on MS web site. It's free.
|
|
|
|
|
No, it doesn't work. Remember, he's comparing binary EXE files, not the source files.
--
Weiter, weiter, ins verderben.
Wir müssen leben bis wir sterben.
I blog too now[^]
|
|
|
|
|
WinDiff DOES binary comparison.
There is no spoon.
|
|
|
|
|
But how do you easily see which binary differences aren't logical differences?
--
Weiter, weiter, ins verderben.
Wir müssen leben bis wir sterben.
I blog too now[^]
|
|
|
|
|
Ray Gregory wrote:
Does anyone know how to reliably compare two .NET exe files to see if they are the same (except for time stamps and version information)?
In addition to what Daniel wrote (and in case you don't necessarily need to compare/view the C# code) you could use the IL disassembler from the SDK to disassemble the exe files and compare that. Basically the same suggestion as the one Daniel made but without installing new tools.
ildasm foo.exe /out=foo.il
Best regards
Dennis
P.S. A really cool open source diff tool I use instead of WinDiff is WinMerge[^].
|
|
|
|
|
Informex has recently moved into beta a tool called IXSnapIn Assembly that allows you to compare .NET Assemblies on local and remote machines. You can compare .NET Assemblies in the GAC or filesystem and results are displayed visually. It's still in an early stage but it may help.
Visit http://www.ixsnapin.com/IXSnapInAssembly.aspx for more information and to download it.
Disclosure: I work for Informex, the developer of this tool.
Glenn Lewis
|
|
|
|
|
Hi all
Can any one explain why C# does not suport for overloading =,.,sizeof,new operators? I am in the need to overload the operator '='.Is there any other way to redifine the functionality of '='.
M.Sendilkumar
|
|
|
|
|
Sendilkumar.M wrote:
Can any one explain why C# does not suport for overloading =,.,sizeof,new operators? I am in the need to overload the operator '='.Is there any other way to redifine the functionality of '='.
Probably because the environment is garbage collected. Those operators you describe are tipically used when you need to implement your own memory management mechanism in C++. This is simply not possible in C#.
About the '.' operator (in C++, the '->' operator), you don't need it because C# has property get/set pairs, so it's a much more elegant and simple solution to the same problem.
Yes, even I am blogging now!
|
|
|
|
|
|
Hi,
From webpage
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/battery/hh/battery/UPS_mini_10660b09-2746-44ea-9f27-5523677ae09e.xml.asp
it says that there is a sample UPS minidriver in the XP DDK at src/general subdirectory. However, my XP DDK has no such directory/subdirectory. It may be that it is old (original XP) and I have ordered the new SP2 version, but in the meantime, does anyone know what this file's name might be or where it might be located in the original XP DDK? If you could provide me with that information or a copy of the file, it would be much appreciated.
Thanks,
Tom
|
|
|
|
|
I have a class where I override GetEquals(), == and != and now need to override GetHashCode(). The class in question has only string data members. Any tips on how to generate a "good" hash code? (I assume I call GetHashCode() on each of the strings then somehow munge the results together, but what's the best way to do that--with my luck, I'll pick a method that results in zero half the time.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
In addition to what Daniel said, you should also take a look at a few examples of similar classes by viewing some of your favorite (and similar) classes in ildasm.exe that installs with the .NET Framework SDK or a decompiler like the .NET Reflector[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello gurus,
I would like to know if there is a data importer in .NET like in the excel's or access' "Import Data" option? Or must I reinvent the wheel?
As most software have this "Import Data" I guess it's already built in .NET but where is it?
Which class does that? I feel this functionality of data import exist in the framework.
Thanks for the answers.
Best regards.
There is no spoon.
|
|
|
|
|
The .NET Framework base class library (BCL) is just that - a class library. It does not - and should not - contain such functions as data import, but should - and does - facilitate it. That's what a base class library is for. It's not a piece of software like Excel - which is a functional product.
Besides, into what format are you importing data? There's no standard format in .NET for data like an XLS for Excel or something. The only thing that comes close is to import data from either a database or an XML file (the serialized representation) into a DataSet . Importing data into your own classes is specific to your implementation.
The BCL facilitates that through I/O classes, data readers and adapters, the DataGrid , and just about anything else you can use to import and manipulate data. How you do that depends on your requirements, but there are classes to help that like the FileStream , the TextReader , a DataReader derivative, the DataAdapter derivatives, and many, many more.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi Heath,
Thanks for your answer.
In a first time, I need to import data from a text file with a delimiter.
I guess that things like ODBC does automatically that. or maybe there is something already done in .NET.
In my 1st esquisse of the importer, I use the DataSet class to store the read data from the text file, and I use the StreamReader to read the contents of the text file.
Storing in a DataSet object the contents of the analyzed text file goes well.
BUT...
The day the data from the text file takes a huge amount of disk space (more than the physical memory itself), the entire data can't fit into the memory. So, we need to read little by little the data. There are several text files that contains exported data from an Database server that are huge in size. Then, using DataSet won't feet in memory.
I guess that MS has done something that matches with this problem, because most software does data importation. In an old time, ODBC was the answer to data importation/exportation.
So, I guess also that .NET provide something like ODBC and text drivers to read data stored in text is a specified formating (separated by a delimiter like coma, tab...)
Best regards.
There is no spoon.
|
|
|
|
|
bouli wrote:
In a first time, I need to import data from a text file with a delimiter.
Why not just read through the file and as you read each line into a string , use the Split method of the string using your delimiter to break it into pieces and the process the results.
- Nick Parker My Blog | My Articles
|
|
|
|
|
That's what I do.
but at the end, the whole data remains in memory.
There is no spoon.
|
|
|
|
|
That's because your not finishing the processing of the data. You don't add all those records to the database (or whatever your using as a database) all at once in a single dataset. You read a record out of your file, parse it up, process it, then send it to it's destination. You DON'T store it in a dataset, or any other memory object for that matter. Let the database do it's job. Don't try and do the job for it. You already found out why...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
so, how can I finish processing the data?
I would like to store these parsed rows. I don't see any methods to write datasets (or datarows) in a file...
There is no spoon.
|
|
|
|
|
bouli wrote:
I would like to store these parsed rows.
So read in X number of rows then record them in a database, then read X more and continue till you're done processing the file. That's how bulk import applications work. The DataSet is not always the best solution to use, either, but if you want to save a DataSet to a file use DataSet.WriteXml and to read it use DataSet.ReadXml . This will operate on XML files, though, no delimited files.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
If you have another suggestion, it's welcome.
the goal is to save the processed lines from the text file, in my own format.
The rows I read are correct, the contents of the rows in memory are correct, but I don't want all in memory. once I processed the row, I store immediatly the row in order to keep only one row in memory.
There is no spoon.
|
|
|
|
|
We just told you how to do it. Read your file line-by-line, process it however you require, then save it. This is a simple, entry-level problem with file I/O. As we've all said - don't read the whole thing into memory, only deal with one or a few rows at a time and persist the processed data however you require. It's your requirements (which you failed to tell us about anyway: "process" could be anything) so you need to figure out how to process the data. The System.IO and System.Data namespace classes are there to facilitate retreiving and storing data.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
ok.
So instead of using the ReadToEnd() method of StreamReader , I may do a loop and use the ReadLine() method, like in the MSDN sample.
There is no spoon.
|
|
|
|
|