Casting Between Custom Types in C#

This is a follow up from the article on Casting Custom Types To C# Built-In Types.

In the previous article we looked at how we would take a custom object like a Class or a Struct and cast it to a C# built-in like a bool. In this article we will look at how to cast from one custom type to another.

What we will be exploring here is much like what AutoMapper does.

Casting Custom Types To C# Built-In Types

Quick Quiz

What does the code below do?

#
1
2
3
4
5
6
CustomObject c1 = new CustomObject()
bool variableName = Convert.ToBoolean(c1);

//1. variableName is false
//2. runtime exception
//3. It depends

If you’re not sure what the answer is, read on - all will be clear.

Understanding & Creating Dotnet Assemblies

If you’ve been doing C# development for any amount of time, chances are you’ve seen the term “Assembly” or “Assemblies” thrown around pretty often. This article helps the complete beginner understand what Assemblies are, how to use them, and how to make them.

Takeaway


The takeaways from this article are:

  1. Understand what an Assembly is
  2. Understand why they are useful.
  3. Learn how to make one.

Background Jobs with Hangfire in ASP.Net Core

This article discusses background jobs; what they are, why use them and how to set them up in an ASP.Net Core Web Application. There are several options for implementing background jobs but the framework of choice here is hangfire because of its ease of entry for beginners.

Takeaway


The takeaways from this article are:

  1. What background jobs are.
  2. What situation requires Background Jobs.
  3. How to use Hangfire to create background jobs in ASP.Net Core.

Dependency Injection in Asp.Net Core for Beginners - Part 1

There are a lot of concepts that beginner programmers encounter when they start to go beyond writing simple console applications in dotnet and maybe try to build a website. One of such concepts is Dependency Injection (DI).

Takeaway


After reading this article you will know the following:

  1. What dependency Injection is.
  2. Why we need dependency Injection.
  3. How we use/do dependency injection in dotnet core.

Running an ASP.NET Core Web Application on Alibaba Cloud Elastic Computing Service (ECS)

ASP.NET Core is a Microsoft Web Framework for developing Web Applications that can run in any environment, including Windows and Linux servers. According to Microsoft Docs:

ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-based, Internet-connected applications.

This tutorial provides detailed step by step instructions for a first time Alibaba Cloud user to create a Linux Elastic Compute Service (ECS) instance and host an ASP.NET Core Application on it.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×