Concept & Important C# Terms ( 01B - Beginner)


There are some important concepts and terms a beginner .net developer needs to understant. Here, i will shed more light into them in details.
1 .Net SDK
An SDK is a collection of tools, libraries, documentation, and code samples provided by a platform or service to help developers build applications for that platform. For developing .Net Application, you need to install the .NET SDK which contains the .Net CLI (Command Line Interface), Runtimes etc . Withe the .Net CLI , you can create new applications based on templates , restore packages , build , test the application and create deployment packages.If you use Visual Studio , .Net SDK is installed as part of it’s dependencies.
SDK = Runtime + developer tools to build, test, and run applications + templates
It includes compilers, build tools, debuggers, and libraries.
Lets you write, compile, and run code.
Use case : Developer machine
Examples : .NET SDK, JDK, Android SDK
🧠 Think of it like:
“I have everything I need to create and run the movie.”
You can install multiple versions of .Net Sdk
> dotnet --list-sdks : shows different versions of .Net SDK installed on your system.
> dotnet --version : To view the current version
By default , the latest version is used.
2 .Net Runtime
A Runtime is the minimum environment needed to run an application built with a specific framework.
It executes precompiled apps
It does not include tools to create or build apps
Use Case : End-user or production servers
Example:
.NET Runtime
,Java Runtime Environment (JRE)
,Node.js Runtime
.
🧠 Think of it like:
“I can watch the movie, but I can't make or edit it.”
> dotnet --list-runtimes : To view which runtime is installed on the system
3 .Net CLR
The Common Language Runtime (CLR) is the engine or brain of the .NET framework that actually runs your .NET code. The C# Compiler compiles your code into MSIL - Microsoft Intermediate Language . This code is more low level like an assemble code with more OOP features. The MSIL code is later compiled to native code by the CLR
Nuget Packages
A NuGet package is like a ready-made box of code that you can plug into your .NET project to save time. They help you add features to your app without writing it all yourself. They are available on Nuget Server at https://www.nuget.com
🧠 Think of it like:
You're building a LEGO house, and instead of building every piece from scratch, you buy a pre-made door, window, or roof and snap it into your project. That’s what NuGet packages do — they give you reusable building blocks of functionality
A .nupkg
(NuGet package) file typically contains:
Compiled DLLs (libraries)
Metadata (like version, author, description)
Optional dependencies (other packages it needs)
Adding & Removing Nuget Package in your Project
> dotnet add package <Package-Name> # Adding package to your project
> dotnet remove package <PackageName> # Remove package
Examples :
> dotnet remove package Newtonsoft.Json
Updating Packages
The .NET CLI doesn't have a direct dotnet update package
command. Instead, Re-add the package with a newer version
dotnet add package <PackageName> --version <Version>
Example :
> dotnet add package Newtonsoft.Json --version 13.0.2
NuGet Package Source
A NuGet Package Source is a location where your .NET project looks for NuGet packages — either to install, restore, or update them. Think of it as a feed (like a repository or URL) that contains packages.
> dotnet nuget add source <SourceURL> --name <SourceName> # Adding a package source
Example :
> dotnet nuget add source <https://api.nuget.org/v3/index.json> --name NuGetOrg
Optional: Add credentials (e.g., for private feeds)
> dotnet nuget add source <SourceURL> --name <Name> --username <User> --password <Pass> --store-password-in-clear-text
Other Nuget Sources Command
> dotnet nuget list source # List Package Sources
> dotnet nuget remove source <SourceName> # Remove a Package Source
Example :
> dotnet nuget remove source NuGetOrg
🏗️ Common Types of NuGet Package Sources
Official NuGet Source (default):
Contains public packages like
Newtonsoft.Json
,Serilog
, etc.
Private/Internal Feeds:
Hosted on Azure Artifacts, GitHub Packages, or internal servers.
Used to share company-specific or proprietary packages.
Local Feeds:
A folder on your machine (e.g.,
C:\\packages
) that contains.nupkg
files.Useful for testing or offline development.
📁 Where Sources Are Stored
NuGet sources are usually listed in a config file:
User-wide config:
~/.nuget/NuGet/NuGet.Config
(Linux/macOS) or%appdata%\\NuGet\\NuGet.Config
(Windows)Project-specific config:
NuGet.Config
in your repo/project root
⚙️ Example of NuGet.Config
<configuration>
<packageSources>
<add key="nuget.org" value="<https://api.nuget.org/v3/index.json>" />
<add key="MyPrivateFeed" value="<https://myserver.com/nuget>" />
<add key="Local" value="C:\\MyPackages" />
</packageSources>
</configuration>
Subscribe to my newsletter
Read articles from Olayinka U. Kareem directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
