CSharp ile DLL dosyalarının nasıl oluşturulabileceğini görelim.
Class Library Projesi Oluştur
Yeni bir class library projesi oluşturun.
Class Oluştur
OrnekSinif.cs isminde bir sınıf oluşturun. Örnek bir sınıf aşağıda verilmiştir.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace CSharpCalisma
{
public class OrnekSinif
{
private string site_adresi;
public string Site_adresi
{
get { return site_adresi; }
set { site_adresi = value; }
}
public void SiteyeGit()
{
Process.Start("https://www.google.com");
}
}
}
Derleme Yap
Ekledikten sonra F6 tuşuna basarak class’ı derleyin. Bunu yaparak DLL dosyasının Debug (ya da release modunda çalıştırdıysanız Release) klasörü içinde oluşmasını sağladık.