Every programming language has operators. Operators are the components of the language that, well, operate on variables mostly. Most C# operators are symbols such as % and ??. And some are words, like async and is. In this guide, you’ll see all of them, including an example of each one. We’ll start with the operators that are common among programming languages and end on some that are more specific to C#.
By now, we all know Ctrl+C and Ctrl+V like the backs of our hands. Heck, some developers write entire programs using these copy/paste shortcuts! But what about using other shortcuts to make yourself more efficient? That’s right, I’m talking about Visual Studio comment shortcuts.
You may be aware that the Ctrl+K, Ctrl+C chord creates a comment, but there’s a bit more magic to it than the shortcut alone.
This post will delve into some details about context, language, and efficiency when it comes to comments in Visual Studio. If you’re looking for reasons why you should know this, Mark Henke does a nice job explaining four good reasons.
Now, let’s follow tradition by starting with the basics and working our way to more advanced concepts as we go along.
C# is about objects, classes, and class methods. The runtime handles memory management so you don’t have to. Your C# code is compiled into an intermediate language and runs on the .NET platform. It’s a language built around productivity; therefore, the compiler does many optimizations so you can write clean, readable code.
There are some general standards that fluent C# writers follow. So, if you’re a developer who’s coming to C# from another programming language, you’ll want to know this stuff too! This post is an introduction to the most important standards and sets you on the course to other resources that can help build your C# prowess.
When you first start out with C#, you’ll surely begin by creating a class. This is true whether you’re creating the code by hand or having a tool do it for you. The class is one of the most basic elements of the C# language. It serves many purposes, but the main purpose is for grouping related functions.
There’s more to a class than meets the eye. You can use a class in several ways depending on what style or paradigm of coding you’re using. Also, teams and even codebases often have different naming and casing conventions. In this post, you’ll learn more about the C# class. You’ll also learn about the importance of some best practices, such as following code conventions and using certain patterns.
With that said, let’s get started by outlining a basic class.
The C# interface isn’t exactly intuitive.
Interfaces, in general, are common. We use them all the time. You’re using at least one interface right now as you read this article.
Keyboards, mice, and screens are interfaces to your operating system. It’s the same concept with C# interfaces.
In this article, I’ll start with these familiar device?interfaces as a metaphor for explaining the C# interface. I’ll use examples and alert you to some of the pitfalls. You’ll also learn about industry best-practices when using C# interfaces.
By the end, you should have a clear picture of the C# interface.