Two Solutions:
1
You can separate the classes creating a new project in your solution, you will create a Class library, that will generate a dll.
Than you must go to references and add the new reference to the project.
You should think if this is a good solution, if you are going to use that class in others projects it's a good solution.
2
example of code...
using System;
namespace SimpleMaths
{
public class Operations
{
public static int add(int a, int b)
{
return a + b;
}
public static int substract(int a, int b)
{
return a - b;
}
public static int multiply(int a, int b)
{
return a * b;
}
}
}
Now open Start>>VisualStudio2005/2008 >> Visual Studio tools>>Visual Studio Command Prompt.
Now in command Prompt Locate the Directory where you have saved the .cs file just created. Using CD command.
csc /target:library /out:File.dll test.cs
this will generate the dll file that you want