[C#]Creating and using .dll files


Yesterday in my college during System Software class we were learning about Dynamic Loaders. And the lecturer said some stuff about DLL files. Most people dont realize what a dll file is and how simple it is to create and use one in their programs. I came across programming dlls when I was learning C#.NET. DLL files are just code files that cant run alone. They support other programs. For instance you can store some classes in a dll file and you can link this file to any number of programs you want. And whenever your program wants the class it can just call the dll and it will be loaded @ runtime. Using dlls also reduces the amount of space your code occipies on disk since you are sharing the same dll among many programs. And it also allows modular programming. Anyway, I need not explain much about the advantages of using dlls since its well documented already on the web. You can google it and find more about it yourself!

Now Im gonna teach you how to create your own dll file and use it in your programs!  Some might have seen the FLAMES app that I coded in C#. It actually uses a dll file to store the class that does the computation work. And has the GUI stuff separately.

Continue reading