Can I use one C# class library project to create many dll files like:
using System;
using System.IO;
namespace ClassLibrary
{
public class Class1
{
static public void Test(int a, int b)
{
for (int i = 1; i <= 3; i++)
{
//
// Same Code
//
if (i == 1) { /*......*/}
if (i == 2) { /*......*/}
if (i == 3) { /*......*/}
//
// Same Code
//
//rename dll from ClassLibrary.dll to ClassLibrary#.dll
File.Move("...//ClassLibrary.dll", "...//ClassLibrary" + i.ToString() + ".dll");
}
}
}
}
Or other way that I can write "same code" area only once but achieve this goal?