C# Online Quiz – Level Beginner

Test your C# skills with mycodeblock.com Online Quiz. This quiz is designed to target beginner-level programmers. Score The quiz contains 20 questions, each correct answer will give you 1 point. To pass the quiz you need to score at least 70% i.e. 14 correct answers. If you don’t know C# or you want to get […]

Search User in Active Directory C#

In this article we will discuss how we can search specific user, and user details in Active Directory using C#. Getting Started I will be using a windows forms application for this example. The form consists of Textbox, Button and a Data Grid View. The user will enter the required User Id in the textbox, […]

Easiest Way to Read and Import Excel File Data into DataTable C#

In this article we will discuss how to Read or Import Excel file data into C# DataTable. For this example we will be using the ClosedXML .NET library.   What is ClosedXML? ClosedXML is .NET library which is used for manipulating and writing the 2007+ Excel files. The ClosedXML library is available for free on […]

Learn Partial Class in C# With Simple Example

A Partial Class is a special feature of C#. Partial Class provides a special ability to implement the functionality of a single class into multiple files. All these files are combined into a single class file when the application is compiled. A partial class is created by using the partial¬†keyword. This keyword is also useful […]

Create User in Active Directory C#

In this article we will discuss two approaches to validate user credentials in Active Directory using C# System.DirectoryServices.AccountManagement System.DirectoryServices   1. System.DirectoryServices.AccountManagement: Step 1 – Add reference to System.DirectoryServices.AccountManagement dll into your project. Step 2 – Add below namespace to your code file Step 3 – Use the below code for user creation in AD. […]

Validate Username and Password in Active Directory C#

In this article, we will discuss two approaches to validate user credentials in Active Directory using C# System.DirectoryServices System.DirectoryServices.AccountManagement   1. System.DirectoryServices: Step 1 – Add a reference to System.DirectoryServices dll into your project. Step 2 – Add the below namespace to your code file Step 3 – Use the below code for credentials validation […]