Cara Membuat Class Di C SHARP (C #)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data;

namespace r_ServiceApp__Version_1._0._0._3_
{
    public static class MyConnectionSetting
    {
        public static SqlConnection CON = new SqlConnection(@"Data Source=ROBERT-PC;Initial Catalog=r_ServiceAppIII;User ID=sa;Password=venarius");
        //public static SqlConnection  CON = new SqlConnection(@"Data Source=.\SQLSERVER;Initial Catalog=r_ServiceAppIII;Persist Security Info=True;User ID=sa;Password=admin");
        public static SqlCommand CMD = new SqlCommand();
       
        public static void BukaKoneksi()
        {
            CON.Open();
        }

        public static void TutupKoneksi()
        {
            CON.Close();
        }

        public static void Perintah()
        {
            SqlCommand CMD = new SqlCommand();
        }
    }
}

Populer

Memperbaiki Hp yang selalu memunculkan notifikasi pengisi daya tidak di dukung

Mengatasi Notifikasi icon network yang selalu silang

CARA MENGKONEKSIKAN LAPTOP WIN 7 KE SESAMA OPERATING WINDOWS