Q1. How to create a dll file in .net?
S1: When you create a new project, you must choose the project type as "Class Library". Then after you complie the project/solution, you will get a dll file.
Another method is to change the project's properties. In the "Application" Option, change the output type to class library.
Q2. How to use a dll file in .net?
S2: First, you must get the dll file :)
Then, you should add Reference for this dll, Project->Add Reference.
btw: It's the same thing in the CPlusPlus and Java.
Now, when you want to use the function provided by this dll file, you can use the class in the dll to get a instance, then you can get the right to invoke the functions.
e.g. CSample cs = new CSample();
cs.fun1();