C#

C# 9 top-level programs and target-typed expressions
Article

C# 9 top-level programs and target-typed expressions

Tom Deseyn

Discover the new features in C# 9: top-level statements and target-typed new and conditional expressions. These features make C# less verbose and can be used in everyday programs.

.NET Core and OpenAPI featured image
Article

Using OpenAPI with .NET Core

Tom Deseyn

Learn how to use OpenAPI to describe the APIs provided by an ASP.NET Core service, then use the API description to generate a strongly-typed client.

Explore C# 8
Article

Some more C# 8

Tom Deseyn

In the final articles of this series, explore C# 8's new static local functions, indices and ranges, and using declarations.

C# 8 nullable reference types
Article

C# 8 nullable reference types

Tom Deseyn

Explore how C# 8 lets us express whether a variable shouldn’t be null, and when it can be null.

C# 8 default interface methods
Article

C# 8 default interface methods

Tom Deseyn

Explore how C# 8 allows developers to extend an interface and provide a default implementation, then check out the rest of this C# 8 series.

Pattern matching
Article

C# 8 pattern matching

Tom Deseyn

We explore C# 8's extended pattern matching support and compare it to pattern matching in C# 7.

Asynchronous streams
Article

C# 8 asynchronous streams

Tom Deseyn

Explore the new C# 8 asynchronous streams feature in this first article in our series covering the new features available in C# 8.

.NET Core
Article

Using .NET PInvoke for Linux system functions

Tom Deseyn

.NET Platform Invoke (PInvoke) makes it easy to consume native libraries. This article describes how to use PInvoke for Linux system functions.

.NET Core
Article

Announcing .NET Core 2.2 for Red Hat Platforms

Bob Davis

We are very excited to announce the general availability of .NET Core 2.2 for Red Hat Enterprise Linux and OpenShift platforms! This general availability is in lock-step with Microsoft's release yesterday . .NET Core is the open-source, cross-platform .NET platform for building microservices . .NET Core is designed to provide the best performance at scale for applications that use microservices and containers . Libraries can be shared with other .NET platforms, such as .NET Framework (Windows) and Xamarin (mobile applications)...

Red Hat OpenShift
Article

How to call the OpenShift REST API from C#

Takayoshi Tanaka

In this article, I show how you can call the Red Hat OpenShift REST API from your C# code, which is useful for automating tasks. Visual Studio is used to take the REST API definition and create a library you can use in your code. Also shown is how to handle the conversion needed for the JSONpath components.

.NET Core
Article

Announcing .NET Core 2.1 for Red Hat Platforms

Bob Davis +1

We are very pleased to announ ce the general availability of .NET Core 2.1 for Red Hat Enterprise Linux and OpenShift platforms! .NET Core is the open-source, cross-platform .NET platform for building microservices . .NET Core is designed to provide the best performance at scale for applications that use microservices and containers . Libraries can be shared with other .NET platforms, such as .NET Framework (Windows) and Xamarin (mobile applications). With .NET Core you have the flexibility of building and...

.NET Core
Article

Red Hat Releases .NET Core 2.0

Bob Davis

As a follow-up to yesterday’s press release , I am pleased to announce the immediate availability of and support for .NET Core 2.0, the latest version of the open source .NET Core project, on Red Hat’s portfolio of open technologies. A lightweight and modular platform for creating web applications and microservices, .NET Core 2.0 provides significant new developer capabilities while enabling developers to create .NET applications across platforms, and deploy on Red Hat Enterprise Linux, Red Hat OpenShift Container Platform...

DotNET Core process image
Article

From Java to .NET Core, Part 2: Types

Yev Bronshteyn

In my previous post in the series, I discussed some fairly surface-level differences between C#/.NET and Java. These can be important for Java developers transitioning to .NET Core, to create code that looks and feels "native" to the new ecosystem. In this post, we dig beneath the surface, to understand .NET's type system. It is my belief that, with Java in the rear view mirror, the .NET type system is more effective and enjoyable to write on. But you be...

DotNET Core process image
Article

Writing a Linux daemon in C#

Takayoshi Tanaka

When you want to run .NET Core process as a daemon on Red Hat Enterprise Linux, you can create a custom systemd unit. Today I'll write about two examples of custom systemd unit for .NET Core. The one is a oneshot type for running a .NET Core console application and the other is a simple type for running an ASP.NET Core Web application. Oneshot type with a console application Building an app You can use dotnet run in systemd with...

Java to .NET Core
Article

From Java to .NET Core. Part 1

Yev Bronshteyn

There was a time when the word ".NET" was virtually synonymous with bloat, vendor lock-in, and Windows. .NET Core is the exact opposite. It's blazingly fast . It's open source under a permissive license (Mostly MIT , some parts Apache-2.0 ). Unlike some other open-source platforms , .NET Core's Contributor License Agreement does not grant exclusive privileges to a single corporation. .NET Core is cross-platform, allowing you to target Windows, Mac, Docker, and many flavors of Linux. My favorite resource...

DotNET Core process image
Article

Creating Your First .NET Program on Red Hat Enterprise Linux

Don Schenck

Sometimes things are really easy. This is one of those cases. There are only six steps to creating and running your first .NET program on Red Hat Enterprise Linux (RHEL). Install dotnet What's that? You don't have RHEL installed on your Windows PC in a Virtual Machine (VM). That's okay ... I'll wait while you install it. Just follow this video to download and install the Red Hat Development Suite . Okay, now that you have a VM, open PowerShell...

Red Hat Enterprise Linux
Article

Sharing between Windows 10 and your VM

Don Schenck

If you're are anything like me, you find the easiest -- yet still best -- way to get things done. After all, life is too short to write programs using Edlin, so give me Visual Studio Code (VS Code). So, what's an easy way for a Windows .NET developer to write code for Linux? Enter the Red Hat Development Suite, a zero-cost bundle for running Linux on your Windows PC, including running .NET Core. After installing the Red Hat Development...

Creating your first ASP.NET MVC web site on RHEL
Article

Creating your first ASP.NET MVC web site on RHEL

Don Schenck

Follow this blog post, and within minutes you will have an ASP.NET MVC website running on Red Hat Enterprise Linux (RHEL). Yes, I'm talking to you, Windows .NET developer; you're about to double your OS skillset. Let's do this. I'm going to start with some assumptions: You are running Windows. You are not running Linux. Based on those two assumptions, we're going to: Install a RHEL Virtual Machine (VM) on your Windows PC. Start and run the VM. Install .NET...

Red Hat Enterprise Linux
Article

Welcome to Red Hat Enterprise Linux, MSBuild, a build tool for .NET Core CLI!

Takayoshi Tanaka

Microsoft announced the first "alpha" release of the new MSBuild-based .NET Core tools. .NET Core SDK which can be downloaded from the Red Hat Developer Program site consists of .NET Core Runtime and .NET Core command line tools (.NET Core CLI). (Reminder - you must have a Red Hat Enterprise Linux subscription first. If you don't, you can go here for a no-cost subscription.) The MSBuild tool is included in .NET Core 1.0 preview 3 (not in the latest release...