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. C# is a modern Object-oriented programming language. C# is the main programming language in Visual Studio.

Introduction to Visual Studio and C#:

Introduction to Visual Studio and C# (YouTube) + PowerPoint (PDF)

 

Visual Studio and C# - YouTube Playlist (YouTube) - Here you find videos for Visual Studio and C#.

 

Download Visual Studio:

Latest version of Visual Studio is Visual Studio 2022. Visual Studio Web Site.

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 may still not available for Visual Studio 2022, then you need to use Visual Studio 2019.

 

 

Getting Started with C#

Below you find different resourses for Visual studio and C#.

Simulation and Control with C# and WinForms:

This video goes through the creation of a basic Visual Studio/C# Application.

Simulation and Control with C# and WinForms (YouTube) + PowerPoint (PDF)

 

Create and use Multiple Forms in a Desktop Application (YouTube) + PowerPoint (PDF) - By creating a Windows Forms Application with only one Form you may end up with a very complicated and poor designed GUI. This Tutorial will show how you can create and use Multiple Forms in your WinForms Desktop Application. Then it is much easier to create a logical and structured GUI. It is not more complicated to create and use multiple Forms in your Application and the results becomes so much better! All professional applications use multiple windows.

 

Additional Resources:

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.

Beginner

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)

 

Intermediate

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)

 

Advanced

In this Tutorial we will use Visual Studio, C# and SQL Server and create a Windows Forms CRUD Application. This Tutorial goes through how to create a Windows Forms Application in Visual Studio with CRUD functionality. It will communicate with an SQL Server Database. It will Insert, Retrieve, Update and Delete Data using an SQL Server Database.

Visual Studio, C# and SQL Server - Creating a Windows Forms CRUD Application (YouTube) + 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).

Visual Studio/C# and DAQ Tutorial

 

 

Plotting Data in C# Desktop Applications

Do you need to Plot your Data in your Windows Forms Application? Plotting Data in Windows Forms is something you often want to do. The built-in Chart Control for Windows Forms is no longer supported by Microsoft in the latest .NET versions. So, we need to find and use alternative solutions. Many third-party Chart Tools exist. Most of these are commercial and costs money while others are free.

This Tutorial will use ScottPlot, which is a free and open-source plotting library for .NET.

ScottPlot Tutorial

 

 

Datalogging and Monitoring with C#

Video: Introduction to Datalogging and Monitoring:

Se also Datalogging using SQL Server with C# (YouTube).

 

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

Azure DevOps is a tool for Software Engineering, including Planning, Collaboration, Source Code Control, Bug Tracking, etc. Azure DevOps is developed by Microsoft.

Introduction to Azure DevOps (YouTube) + PowerPoint (PDF)

 

 

OPC Communication in C#

OPC is a communication protocol for data exchange between devices from different Manufactures and typically used in Industrial and Automation Systems. OPC requires an OPC Server that communicates with one or more OPC Clients. OPC UA is the next generation OPC and it is cross-platform.

OPC UA with Visual Studio and C# + PowerPoint

 

Programming Resources

Below you will find more interesting Programming resources


LabVIEW

Learn LabVIEW Programming

MATLAB

Learn MATLAB Programming



Azure DevOps

Azure DevOps Resources

Database Systems

Learn Database Systems and Structured Query Language (SQL)



Python

Python Programming Resources

DAQ

DAQ Resources