Arrow ساختن dll
سلام دوستان کدی که براتون نوشتم مربوط هست به ساخت DLL به زبان#c
کد PHP:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace DLL
{
public class SqlQuery
{
private static string connectionstring;
static SqlQuery()
{
connectionstring = ConfigurationManager.ConnectionStrings[1].ConnectionString;
}
public static void ExecuteNonQuery(string sql)
{
SqlConnection objCon = null;
try
{
objCon = new SqlConnection(connectionstring);
SqlCommand objcommand = new SqlCommand(sql, objCon);
objcommand.CommandType = CommandType.Text;
objcommand.CommandText = sql;
objCon.Open();
objcommand.ExecuteNonQuery();
}
finally
{
if (objCon != null)
{
objCon.Close();
objCon.Dispose();
}
}
}
}
}