I am primarily a C ++ encoder and have not touched C # after a few years (so forgive me if I ask a question, which may be brain fart in my part).
Background information: I am writing a utility for organizing files (just for fun and for cleaning duplicates on my computer). I was able to run MD5 checksums for files and files and find duplicate files in different subdirectories, sometimes with the same file name, and sometimes not (always the same file type). I initially did this using only the lines of the file path and Winform, Arraylist, Arrays objects in the code for "MainFrom", as a proof of concept. The code is really ugly, and I'm already confused looking at it, so it is definitely not supported.
So I decided that a more elegant and reasonable design would be stored as an object that would have simple things like filepath, filename, MD5, fileType, etc. (yes, I know about FILE). Then I realized that it makes sense if it had references to other instances of objects that were "duplicates", "similar." I am looking to create an array of pointers that is part of an object that points to duplicate objects. Thus, at runtime, I could go through all the duplicates, find out their properties, etc.
I planned to later inherit this class for certain types of files, such as mp3 or jpg files, where I can compare content (for example: I could determine which pictures can simply be changed by versions of each other and point them to each other). But C # has no pointers. I looked at the delegates, but then again, this is not what I want.
My dilemma: C # doesn't have a pointer in managed code (I don't want to use unmanaged sections unless I need it).
I also thought about creating something like an arraylist and passing in "objects" at runtime. But does this not create duplicates? Is this not a link to a new object?
I would really like the advice from those who made the transition from C ++ to C # , as I move beyond this. Please feel free to let me know if I totally disagree with the design here. (I assume that since they are both object oriented, such a design will work in both worlds).
I would really like links to other sources that may help (since I'm not the first C ++ code trying to encode in C #). Thank you in advance!