Ana içeriğe atla

Kayıtlar

try catch finally Hata Denetim Alıştırması

En son yayınlar

Değer Döndüren Metot

  using System.Runtime.InteropServices; namespace Metod_Değer_Döndüren_Metot {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         //Parametre Almayan ve  Değer Döndüren (Return) Metot         string Mesaj()          {             return"Metod Çağrıldı"; //Değerimiz Çağrıldığında çalışacak döndürülecek Metodumuz         }         //Değer Alan Parametre Döndüren Metot         int topla(int a, int b)          {             return a + b; //Döndürülecek olan Method         }         // return: Metot çalıştığında bir değer döndürmesini sağlar.  ...

Private Void Metod

 namespace Metotlar {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         //Parametre Almayan Değer Döndürmeyen Metot         //Değer döndürmeyen metot tanımlarken Başa Void yazılır         //Tekrar tekrar aynı kod parçasını yazmaya gerek kalmaz Metot adını istediğinde çağarabilirsin         //void : private void olan metot başka yerden erişelemez         //public void olanlar ise erişime açık (dışarıdan görülebilen) anlamına gelir         //Örnek : MesayYaz Metotu: Çağrıldığı yerde ekrana bir mesaj veren metot yazalım         void MesajYaz()          {             MessageBox.Show("Merhaba Ben Parametresiz...

Microsoft.Data.SqlClient Örnek VeriTabanı

using System; using System.Data; using Microsoft.Data.SqlClient;//Install-Package Microsoft.Data.SqlClient using System.Windows.Forms; namespace Sql_Try {     public partial class Form1 : Form     {         SqlConnection sqlVT = new SqlConnection(@"Data Source=DESKTOP-0B1GIRL;Initial Catalog=My_Form;Integrated Security=True;Encrypt=True;Trust Server Certificate=True");         public Form1()         {             InitializeComponent();         }         private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }         private void button1_Click(object sender, EventArgs e)         {             string Name = textBox_isim.Text;         ...

C# Delete

//using System.Data.SqlClient; //Yeni Güncelleme geldi //Araçlar>NuGet Paket Yöneticisi>Paket yöneticisi Konsole //Install-Package Microsoft.Data.SqlClient //Kodu Yapıştırdık //using System.Data.SqlClient;  Microsoft.Data.SqlClient şeklinde değiştir ve Sorun Çözüldü //Problem SqlConnection bağlantısının altı ve üzeri çizili idi yeni version 9 geldiği için yukarıdaki değişiklikler yapıldı using Microsoft.Data.SqlClient; namespace Update {     public partial class Form1 : Form     {         SqlConnection sqlBaglanti = new SqlConnection(@"Data Source=DESKTOP-0B1GIRL\SQLEXPRESS;Initial Catalog=TestVT;Integrated Security=True;TrustServerCertificate=True");         public Form1()         {             InitializeComponent();         }         //Güncelleme İşlemi         private void button1_Click(object sender, Even...

C# Update

  //using System.Data.SqlClient; //Yeni Güncelleme geldi //Araçlar>NuGet Paket Yöneticisi>Paket yöneticisi Konsole //Install-Package Microsoft.Data.SqlClient //Kodu Yapıştırdık //using System.Data.SqlClient;  using Microsoft.Data.SqlClient;   şeklinde değiştir ve Sorun Çözüldü //Problem SqlConnection bağlantısının altı ve üzeri çizili idi yeni version 9 geldiği için yukarıdaki değişiklikler yapıldı using Microsoft.Data.SqlClient; namespace Update {     public partial class Form1 : Form     {         SqlConnection sqlBaglanti = new SqlConnection(@"Data Source=DESKTOP-0B1GIRL\SQLEXPRESS;Initial Catalog=TestVT;Integrated Security=True;TrustServerCertificate=True");              public Form1()         {             InitializeComponent();         }         private void button1_Click(object sender, EventA...

C# İnterface Örnek Uygulama Kod Yapısı

#   Interface1.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Arayuz_uygulama {     interface IDuzenle //İşlem seçeneklerimiz     {         void ekle();         void sil();         void guncelle();     }     class Polis : IDuzenle //Polis bilgilerinin işleme alınması     {         public void ekle()         {             Console.WriteLine("Polis Memuru Atandı!");         }         public void guncelle()         {             Console.WriteLine("Polis Memuru Güncellendi!");         }         public void sil()         {             Console.WriteLine("...