![]() To override the Equals() method of the class, and tell the computer Will never share the same memory address, they will never be equal. Which is to say, it compares the memory address of the object. NET simply uses the default Equals() method, When you are comparing customĬlasses however. Is comparing to determine if we have a match. IndexOf() uses the Equals() method of the objects it IndexOf() doesn't take a comparer object. This posed an interesting problem for me. Too needs to deal with child objects, namely, the keys. The Section object is also based on an ArrayList, since it This made adding and manipulating sectionsĮasy. I chose this, because theĪrrayList class has some powerful features that make life easy, such asĪdd(), RemoveAt(), and IndexOf(), as wellĪs sorting and searching features. The main component, the IniFile, is an ArrayList. Suddenly, this made a lot sense, and everything fell into place from there. Ok, so we have an *.ini file, that's an object. Language, and I should re-think my approach. ![]() It was then that I remembered I was dealing with an object oriented based Time I tried to add even the most simple feature, I found myself re-writing huge #Read and write ini file vb net code#It worked, but the code was ugly, and every Single ArrayList - the contents of the file were read line-by-line into theĪrrayList, and then had to meticulously examined and manipulated in order to My first draft of this class was scrapped completely. Put under any kind of heavy load situation), I did try to make things as simple Scenario where an *.ini file is being referenced thousands of times a second, or ![]() While speed is not of the essence in this class (I simply cannot imagine a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |