Skip to main content

Posts

Showing posts from March, 2020

How to perform Insert/Update/Delete operation in Generic Collections in C#

Getting Started In ASP.NET 5 we can create console applications. To create a new console application, we first open Visual Studio 2015. Create it using File-> New-> Project. Now we will select the ASP.NET 5 Console Application because we will create the console application and click on the OK button. we need to include the following references in our application. using System; using System.Collections.Generic; Insert, Update, Delete, Get perform in List collection. public static void DML_List() { // Creating a List of integers IList<int> list = new List<int>(); // Printing the insert opeartion Console.WriteLine("INSERT"); // Adding elements in list collection list.Add(100); list.Add(200); list.Add(300); list.Add(400); list.Add(400); // Printing the element from list collection foreach (object x in list) { Console.WriteLine("Result : " + x); } Console.WriteLine("\n"); // Printing th...