It is impossible to insert data or delete data in O (1) in C #, nor C ++, nor in any language with standard APIs or class libraries.
The best thing you could do is to have some kind of file format that you yourself define, it can support O (1) installs and uninstalls. But you probably have to deal with fragmentation.
Perhaps you can also take a look at an SQL database such as sqlite, which will take care of the complexities for you.
Brian R. bondy
source share