Visual Studio and C#

Hans-Petter Halvorsen

Visual Studio

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It can be used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all platforms supported by Microsoft Windows.

Latest version of Visual Studio is Visual Studio 2022.

Visual Studio Web Site


Download Software:

Download Visual Studio 2022 Community Edition (free)

You can also download Visual Studio Enterprise Edition from Microsoft Azure Dev Tools for Teaching (free for staff and students at the University).

Some software packages and add-ons are still not available for Visual Studio 2022, then you need to use Visual Studio 2019.


Working on a Mac?

Download Visual Studio for Mac

or need a Cross-platform Editor?

Download Visual Studio Code - Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux and macOS.



Getting Started with C#

C# is a modern Object-oriented programming language. C# is the main programming language in Visual Studio.

Video: Simulation and Control with C# and WinForms: The video below goes through the creation of a basic Visual Studio/C# Application:

PowerPoint (PDF)



Introduction to Visual Studio and C# (PDF)


See also .NET and C# In-Browser Tutorial



SQL Server Communication with C#

Topics: SQL Server, ADO.NET, C# WinForms, Structured Query Language (SQL), Saving Data to SQL Server and Retrieving Data from SQL Server.


In this tutorial we will create a basic Windows Forms App that saves data to an SQL Server Database. The App will also retrieve Data from the SQL Server Database.

SQL Server with C# Windows Forms App (YouTube)

PowerPoint (PDF)

Download Code Example (ZIP)



In this Tutorial we will create a basic Datalogging System using C# and Windows Forms. Data will then be stored in an SQL Server Database.

Datalogging using SQL Server with C# (YouTube)

PowerPoint (PDF)



In this Tutorial we will use Visual Studio, C# and SQL Server and create a Windows Forms CRUD Application.

PowerPoint (PDF)



Data Acquisition with C#

What is Data Acquisition? Data Acquisition (DAQ) is the process of collection data from different sensors into a computer.

A DAQ System consists of 4 parts: Physical input/output signals, sensors DAQ device/hardware Driver software Your software application (Application software).

Video: Data Acquisition in Visual Studio and C# using USB-6008 as an example:

PowerPoint used in the Video

This video is also available from my official YouTube Channel:


Here is my main web page for DAQ Applications in C#:



Additional Resources:

More Information about USB-6008


Introduction to Data Acqquisition in Visual Studio and C# (PDF)

Code Examples:

C# DAQ Examples



Datalogging and Monitoring with C#

Video: Introduction to Datalogging and Monitoring:



Video: Cloud-based to Datalogging, Monitoring and Analysis:




Web Programming with ASP.NET

ASP.NET is a Web Framework for creating Web Pages. ASP.NET is built on top of the .NET Framework

Video: ASP.NET Core - Create your first Hello World Application:

This video is also available on my Youtube Channel (Industrial IT and Automation).


See my ASP.NET web site for more information and resources



Azure DevOps

Video: Introduction to Azure DevOps (formerly known as Visual Studio Team Services):




Unit Testing with Visual Studio

Video: Introduction to Unit Testing with Visual Studio:


PowerPoint used in the Video



OPC Communication in C#

Video: OPC DA Communication with C# using Measurement Studio:

PowerPoint used in the Video


OPC UA with Visual Studio and C# + PowerPoint used in the Video


Additional Tutorials and Examples

Database Communication in Visual Studio/C# using Web Services + Database Example

Creating 3-tier Architecture in Visual Studio + Database Example


Programming Resources

Below you will find more interesting Programming resources


Learn LabVIEW Programming


Learn MATLAB Programming

Visual Studio Team Services

Visual Studio Team Services (VSTS) Resources

Database Systems

Learn Database Systems and Structured Query Language (SQL)


Programming Resources

Technology Videos

Lots of Videos within different Applications and Areas