سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب کد ساخت Autoincrementing Primary Key با DataColumn در سی شارپ #C را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
کد ساخت Autoincrementing Primary Key با DataColumn در سی شارپ #C :
using System;
using System.Data;
class Program
{
static void Main(string[] args)
{
DataTable dt = new DataTable();
DataColumn pkCol = dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Field1", typeof(string)).MaxLength = 50;
using System.Data;
class Program
{
static void Main(string[] args)
{
DataTable dt = new DataTable();
DataColumn pkCol = dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Field1", typeof(string)).MaxLength = 50;