Explore C# on Experts Exchange

Expert Solutions for Your Tech Problems

C#

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsof...

Read more
  • 98K Content
  • 11K Contributors

Expert Spotlight
Digital marketing (Hospitality)

Focus on what matters and Let Go OFF what doesn't.

Article

Using Azure Event Grid To Generate and Consume Events

In today’s article we will look at how we can use Azure’s Event Grid to pass events from one application or resource to another. Unlike queues or service bus, the Event Grid will push the events once generated to the subscriber. The subscriber does not have to poll or pull these events.
Article

Load, Compile, Run, and Interact With C# Code Dynamically

Today, we will look into how we can dynamically load C# code into our solution, compile this code, run it, and then interact with it to call methods etc. This might be useful when we want to add plugin code etc.
Article

Azure Clear Environment Specific Data

Recently I got a requirement asking to develop an utility to clear environment specific data such as clearing blobs, cleaning up entities from azure table and clearing service bus messages from topics.
Article

New features in .NET 8

Today, we will look into some new features that are expected in .NET 8. .NET 8 will be the next version of the .NET framework after .NET 7. It will be an LTS (Long-term support) release.
Article

Run Multiple Tasks In Parallel In C# 11

Today, we will see how we can run multiple tasks in parallel and collect the results once done in C# 11. This technique can help us use the multi-processors we have on our hardware and improve performance and efficiency of our applications.
Article

Ahead Of Time (AOT) compilation to native code using C#

Microsoft has just released .NET 7 on 14th November 2022. One of the cool feature introduced with .NET 7/C# 11 is the Ahead of Time (AOT) compilation to native code feature. It allows us to directly compile and publish our code in the native version. Hence, no Just in Time (JIT) compilation.
Article

Parallel execution of tasks in C#

Today we will see how we can run different tasks in parallel in C#. With the current hardware strength, we have machines with multiple processors. Hence, we certainly have the ability to utilize these and run our tasks in parallel to improve performance. But are we really doing this.
Article

Records vs Struct Records in C#

When C# 9 was introduced, one of the main features was a new type called Records. which were reference types. Then with C# 10 came struct based records which were value based with the same properties. Today, we will see what the performance difference between them is.
Article

What to use? ORM vs Stored Procedures

1
Today we will look at a very common debate while developing the data access layer. This is to decide if we want to use stored procedures and keep our logic in the database or do we want to use an ORM like Entity Framework and keep all logic in our middle tier C# code and use the database as a store.
Article

How to create custom attributes in .NET

1
Today we will look at creating custom attributes in .NET. Attributes provide metadata for our elements in our code. These can then be read via reflection and used to handle different conditional logic. The process to create and use them is simple and we will work through an example.
Article
If Else

Logical Expressions in .NET

For many programmers something like: if (someState != someOtherState && someState == someOtherOtherState || someState == someOtherOtherOtherState) { .... } Is a common pattern. I am here to discuss alternatives to this pattern which will reduce *code smells* within code analyzers.
Article

Async and Multi-Threading in C# in Plain English

8
A lot of developers have the wrong ideas about async code and multi-threading and how it all works, or how to use it. Here, you'll learn the differences between the two concepts and implement each one in C#.
Article

How to load JSON's data into SQL Server in different ways

Data can be kept in different media, Sometimes, the data need to be extracted, transformed or loaded in different ways. For this article, I'm going to demonstrate some of the popular ways of importing JSON data into MS SQL Server.
Article
How to load Excel's data into SQL Server in different ways

How to load Excel's data into SQL Server in different ways

3
Data can be kept in different media, Sometimes, the data need to be extracted, transformed or loaded in different ways. For this article, I'm going to demonstrate some of the popular ways of importing Excel data into MS SQL Server.
Article

ADCycleGroups - Multi-Level GPO Phase-In Tool

3
ADCycleGroups is a multilevel GPO phase-in tool I developed to automate the moving of computers and users from one GPO version to the next, until it finally gets to the latest GPO policy. This allows me to gradually move computers and users from one version of a policy to the next.
Article

Use Active Directory Images Anywhere

This is a simple web application that allows you to use Active Directory photos anywhere that you can use a HTML tag
Article

.NET Windows Service Template using Timer, Topshelf and Log4Net

I have personally never liked the standard Windows Service template that comes with Visual Studio. This article describes how I created a Visual Studio template build on the Topshelf library that I use to develop stable Windows Services.
Article

Automatic logoff at schedule

6
Over time I have seen a number of questions asking how to logoff users at a specific time. I personally haven't required this but decided to develop a little Windows service that manages this via schedule and not a legacy scheduled task running shutdown /l or via AD logon hours
Article

Pre Server 2016 Group Membership Expiration Tool

4
Group membership expiration is a superb new feature included with Active Directory 2016 functional level. But what if you want this functionality but you haven't upgraded yet? Since I have many clients that cannot yet leverage this new feature, I have developed a custom tool.
Article
Google Elevation API

How Google Elevation works and how to create a simple C# App?

The article's main focus is , to create a C# console application using Google's Elevation API. For more detailed information about this topic, use the attached links.

Do more with Experts Exchange.


Get Answers

Join a Group Discussion

Collaborate

Monitor your Site

Explore solutions and more