Read and Write XML file used LINQ in C#

XLinq is . NET Language Integrated Query for XML Data It takes advantage of the Standard Query Operators and adds query extensions specific to XML. From an XML perspective XLinq provides the q ...

Download Html to Word Document

HTML: HyperText Markup Language, is a Web format file. DOC: Microsoft Word Document, is a file with .doc and it is associated mainly with Microsoft Word application. cd_ public void DownloadHt ...

Difference between Add and Append methods of a list in C#

List.Add() Add method will modify the instance of the list and adds a single item to the end of the list. This methods will not return anything. cd_////syntax void List.Add(T item) //// ...

Difference Between Add vs AddRange & Insert vs InsertRange in ArrayList C#

h3.Add() vs AddRange() List.Add() Adds an element to the end of the List. cd_////syntax void List.Add(T item) ////ex:- List list = new List{ "ADF", "App Services" ...

How to Read Excel File to DataTable using ClosedXML in C#

ClosedXML libraries used to work with Excel Files such as reading Excel data to DataTables and writing data to Excel files. cd_ /////

///// Reads Execl file to DataSet. ///// Each sh ...

How to export DataTable to Excel using ClosedXML in C#

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It provides user-friendly interface to dealing with the underlying OpenXML API. cd_ public void ...

Difference between Visual Studio and Visual Studio Code

h2.Visual Studio Visual Studio is an integrated development environment (IDE) developed by Microsoft. It is used to develop computer programs, as well as websites, web apps, web services and mobile ...

How to call REST API Post Method using C#

What does a REST API do? A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows f ...

Visual Studio missing ASP.NET Web Application (.NET Framework)

Recently I bought a new laptop and installed the Visual Studio 2022 Community edition and noticed that ASP.NET template for .NET Framework is missing. First time I experienced this situation, I insta ...

How to call asynchronous method from synchronous method in C#?

h2.What is an async method in C#? An async method runs synchronously until it reaches its first await statement, and the method will be suspended until the awaited task is completed. In the meantime ...

Linq - Transform DataTable to Dictionary using C#

When we need to transform 2 columns of data table to a dictionary, we can use LINQ. Dictionary is a Key Value Pair collection and Key should be unique. You can create the Dictionary ...

How to create a Setup Project for Windows Forms application in Visual Studio 2019

Why we need a Setup project? Setup projects are used to create a installer package for the applications we developed. Setup project will generate .EXE and/or .MSI files which can be installed o ...

Encrypting and Decrypting Configuration Sections in web.config file

Usually in in ASP.NET applications the Web .config file stores sensitive information. Examples of sensitive information include usernames, passwords, connection strings, and encryption keys. W ...

The table must contain row sections in order of header, body, then footer.

This is a common exception when you use PagerSettings to GridView in asp.net. Pager Settings Position is trying to generate a Pager above the head or below the footer or both. here is GridView Set ...

How to enable Windows Authentication in IIS if it is missing

To enable in Windows in ASP.NET websites you need to do Enabling Windows Authentication on asp.net website #Open Internet Information Services (IIS) Manager #Navigate to Server -> Sites -> D ...

Access Modifiers in C# Programming

What is an Access Modifier? In Object oriented Programming, all types and type members have an accessibility levels. The accessibility level controls whether they can be used from other code in y ...

How to get current page URL in asp.net website using C#?

In this article, I will give some examples to how to get current page url using asp.net and c#. "Page" class will provide the properties to get all details about the current page like Page Name, Page ...

How to read response from url using HttpClient in C#

System.Net.Http namespace provides a class (HttpClient) for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. HttpClient is useful when downloading large amou ...

How to configure Log4Net for your application

The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. In case of problems with an application, it is helpful to enable logging so that the ...

WIQL Query to get all Child and sub-Child work items in C#

WIQL stands for Work Item Query Language, and it is used to query work items from Azure DevOps. Using this query we can query Work Item Details or Related Work Items. The WIQL syntax is used to execu ...

Remove rows from datatable based on a List using Linq

I have a DataTable with some data and a exclusion List like below ExamData (datatable) |Exam|Year Completed| |AZ-900: Azure Fundamentals|2019| |DP-900: Azure Data Fundamentals|2021| ...