Populate DataTable using DataReader in VB.NET

From this post, we will be talking about the way of populating dataTables using the DataReader in VB.NET. In this example, we’ll be using the SQLDataReader which is available in the SQLClient library. What is a DataReader? DataReader is an object that is used to fetch the data from any data source in a high-performance... » read more

Block/Unblock USB Ports in windows using VB.NET

In vb.NET, it is possible to control the port of windows, by editing the values in the local registry. Below are two functions that can be used to block and unblock USB ports using VB.NET. First, you need to import namespace below: Imports Microsoft.Win32 Disable/Block USB Port using VB.NET Private Sub BlockUSPPort() Dim regKey As... » read more

Introduction to File handling methods in VB.NET

In this article I will shed some light on the most used methods in VB.NET for file handling. File handling is important when it comes to storing and retrieving data using the file system. These functions and methods are in the IO namespace: System.IO Different and most used methods for handling file in VB.NET are... » read more

Introduction to Numeric Functions in vb.net

The .NET Framework has too many numeric functions that can be used out of the box for numeric manipulation. This article is to learn about the most common ones that each developer should know.   The Numeric Functions in VB.NET  All numeric functions that are available VB.NET are implemented as the constant and static methods of Math... » read more

Introduction to iterator in C# and VB.NET

In this article, I will discuss the type of iterators that are supported by C# and VB.NET. .NET Framework usually supports two different kinds of the iterator: External and Internal External iterator: It is the statement where we should specify every single step for completing the task. You can consider the below code: C# List<string>... » read more

Creating Repository pattern in ASP.net MVC

In this article, I will help you to understand how to create a Repository Pattern that is mainly used for large enterprise application. The Repository pattern divides the application’s UI, components of data access and business logic into several layers which are easy to test and maintain. A Employees application will be created which will... » read more

Insert Update Delete example in C# and VB.NET Using ExecuteNonQuery method

ExecuteNonQuery is a method from the SQlCommand Class in the System.Data.SqlClient namespace. It executes a T-SQL query and returns the number of rows affected. Below are examples of how to run an Insert, Delete, and Update statements using the ExecuteNonQuery method in both C# and VB.NET. Required namespaces C# using System.Data; using System.Data.SqlClient; VB.NET Imports... » read more