In some cases we needed to merge the two or more datatable
data in our program either using c# or using vb.net.
So in this article I am going to show you how you can merge
two datatable in a single datatable using c#.net and vb.net.
Some of my previous article are as follows: Random
Number Generator C# , How
to show error message in c# windows application | How to show Error &
Warning Message Box in .NET , How
to implement windows authentication in asp.net mvc , How
to create a Xml Document Programmatically Using C#.Net .
Some of the eboks for learning dotnet:
Professional
ASP.NET 4.5 in C# and VB - Free download eBooks , Free
eBook - Professional ASP.NET 4 in C# and VB .
C#.Net
static void Main(string[] args)
{
DataTable
objdatatable1=new DataTable();
DataTable
objdatatable2 = new DataTable();
//Merg
both the datatable
objdatatable1.Merge(objdatatable2);
}
|
VB.Net
Private Shared Sub Main(ByVal args
As String())
Dim
objdatatable1 As New
DataTable()
Dim
objdatatable2 As New
DataTable()
'Merg
both the datatable
objdatatable1.Merge(objdatatable2)
End Sub
|
0 comments:
Please let me know your view