Compile cs file to DLL : DLL « Development Class « C# / C Sharp






Compile cs file to DLL

 
// Math.cs
   public class Math
   {
      ///<summary>
      ///   The Add method allows us to add two integers
      ///</summary>
      ///<returns>Result of the addition (int)</returns>
      ///<param name="x">First number to add</param>
      ///<param name="y">Second number to add</param>
      public int Add(int x, int y)
      {
         return x + y;
      }
   }
//csc /t:library /doc:Math.xml Math.cs

 








Related examples in the same category

1.Build with the following command-line switches: csc /t:library DllTestServer.cs
2.Load system dll library
3.Create DLL library
4.Create DLLCreate DLL