<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Code With Khareem]]></title><description><![CDATA[Code With Khareem]]></description><link>https://blog.codewithkhareem.com</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 19:17:01 GMT</lastBuildDate><atom:link href="https://blog.codewithkhareem.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Build React frontend from Figma Visual Design - Part 3]]></title><description><![CDATA[https://youtu.be/nqvE3Q7gOaQ]]></description><link>https://blog.codewithkhareem.com/build-react-frontend-from-figma-visual-design-part-3</link><guid isPermaLink="true">https://blog.codewithkhareem.com/build-react-frontend-from-figma-visual-design-part-3</guid><category><![CDATA[React]]></category><category><![CDATA[figma]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Tue, 23 Sep 2025 12:48:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1758631594078/a0a6435d-a3fa-4cb6-96eb-088a1d8f1053.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/nqvE3Q7gOaQ">https://youtu.be/nqvE3Q7gOaQ</a></div>
]]></content:encoded></item><item><title><![CDATA[Build React frontend from Figma Visual Design - Part 2]]></title><description><![CDATA[https://youtu.be/atTKD_nZUYE]]></description><link>https://blog.codewithkhareem.com/build-react-frontend-from-figma-visual-design-part-2</link><guid isPermaLink="true">https://blog.codewithkhareem.com/build-react-frontend-from-figma-visual-design-part-2</guid><category><![CDATA[React]]></category><category><![CDATA[figma]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Tue, 23 Sep 2025 12:43:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1758631227934/8a081279-8ccd-40c6-abf0-3c62a0b1eadc.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/atTKD_nZUYE">https://youtu.be/atTKD_nZUYE</a></div>
]]></content:encoded></item><item><title><![CDATA[Build React frontend from Figma Visual Design - Part 1]]></title><description><![CDATA[This challenge is what led to the development of this series to get frontend developers equipped with design techniques and skills that enable them to replicate a visual design. From this series , you will be able to design frontend web pages that lo...]]></description><link>https://blog.codewithkhareem.com/build-react-frontend-from-figma-visual-design-part-1</link><guid isPermaLink="true">https://blog.codewithkhareem.com/build-react-frontend-from-figma-visual-design-part-1</guid><category><![CDATA[React]]></category><category><![CDATA[figma]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Tue, 23 Sep 2025 12:13:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1758622294428/bd05d839-4d4a-4abe-93c9-720a447b8cbc.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This challenge is what led to the development of this series to get frontend developers equipped with design techniques and skills that enable them to replicate a visual design. From this series , you will be able to design frontend web pages that looks exactly 100% like the visual design you are replicating. The case study used in this series is a Job Tracker App landing Page, Login and Register Page</p>
<p><img src="https://decloud23techltd-my.sharepoint.com/personal/info_decloud23tech_com/_layouts/15/embed.aspx?UniqueId=bbad95cb-3da0-416e-820d-c172ae8246ac&amp;embed=%7B%22ust%22%3Atrue%2C%22hv%22%3A%22CopyEmbedCode%22%7D&amp;referrer=StreamWebApp&amp;referrerScenario=EmbedDialog.Create" alt class="image--center mx-auto" /></p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/RfQ2gzwga-g">https://youtu.be/RfQ2gzwga-g</a></div>
]]></content:encoded></item><item><title><![CDATA[Value , Reference  & Nullable Types]]></title><description><![CDATA[1. Value Types
Description: A value type is like a piece of paper with a number or value written on it. When you give it to someone (or assign it to another variable), you’re giving them a copy of that paper. Changing the copy doesn’t affect the orig...]]></description><link>https://blog.codewithkhareem.com/value-reference-and-nullable-types</link><guid isPermaLink="true">https://blog.codewithkhareem.com/value-reference-and-nullable-types</guid><category><![CDATA[dotnet]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Wed, 28 May 2025 17:28:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/q10VITrVYUM/upload/cc4687d1b631a7592792f4cd2410442d.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-1-value-types">1. Value Types</h2>
<p><strong>Description</strong>: A value type is like a piece of paper with a number or value written on it. When you give it to someone (or assign it to another variable), you’re giving them a copy of that paper. Changing the copy doesn’t affect the original. Value types store the actual data directly and are typically simple, like numbers or true/false values.</p>
<p><strong>Key Characteristics</strong>:</p>
<ul>
<li><p>Stored directly in memory (on the stack, for tech folks).</p>
</li>
<li><p>Includes most predefined types like int, double, bool, char, and structs like DateTime.</p>
</li>
<li><p>When assigned, a copy of the value is made.</p>
</li>
</ul>
<p><strong>Use Cases</strong>:</p>
<ul>
<li><p>Storing simple data like ages, prices, or counts.</p>
</li>
<li><p>Representing dates or times (e.g., DateTime).</p>
</li>
<li><p>Using in calculations where you don’t want the original value to change accidentally.</p>
</li>
</ul>
<h3 id="heading-code-sample">Code Sample :</h3>
<pre><code class="lang-csharp"><span class="hljs-keyword">using</span> System;

<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
{
    <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>)</span>
    {
        <span class="hljs-comment">// Value type: int</span>
        <span class="hljs-keyword">int</span> original = <span class="hljs-number">10</span>;
        <span class="hljs-keyword">int</span> copy = original; <span class="hljs-comment">// Creates a copy of the value</span>
        copy = <span class="hljs-number">20</span>; <span class="hljs-comment">// Changing copy doesn't affect original</span>

        Console.WriteLine(<span class="hljs-string">$"Original: <span class="hljs-subst">{original}</span>"</span>); <span class="hljs-comment">// Still 10</span>
        Console.WriteLine(<span class="hljs-string">$"Copy: <span class="hljs-subst">{copy}</span>"</span>); <span class="hljs-comment">// Now 20</span>

        <span class="hljs-comment">// Value type: struct (DateTime)</span>
        DateTime date = DateTime.Now;
        DateTime copyDate = date; <span class="hljs-comment">// Creates a copy</span>
        copyDate = copyDate.AddDays(<span class="hljs-number">1</span>); <span class="hljs-comment">// Changing copy doesn't affect original</span>

        Console.WriteLine(<span class="hljs-string">$"Original Date: <span class="hljs-subst">{date}</span>"</span>);
        Console.WriteLine(<span class="hljs-string">$"Copy Date: <span class="hljs-subst">{copyDate}</span>"</span>);
    }
</code></pre>
<p><strong>Example</strong>:</p>
<ul>
<li><p><strong>Scenario</strong>: A program tracks a person’s age and the current date.</p>
</li>
<li><p><strong>Value Types</strong>: int for age, DateTime for the date.</p>
</li>
<li><p><strong>Behavior</strong>: Changing the copy variable (age) or copyDate (date) doesn’t affect original or date.</p>
</li>
<li><p><strong>Output</strong> (example, assuming today is May 28, 2025):</p>
</li>
</ul>
<p><strong>Output :</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748453151018/0cc70e1b-6eb2-4950-a7eb-22493c63dfdd.png" alt class="image--center mx-auto" /></p>
<p><img src="https://file.notion.so/f/f/2accd286-0827-484d-84eb-282496808655/41913cec-5d84-4646-b877-0d7b703d963b/Screenshot_2025-05-28_at_18.20.08.png?table=block&amp;id=20108a4a-6e05-809a-a36a-e8fd122f05b2&amp;spaceId=2accd286-0827-484d-84eb-282496808655&amp;expirationTimestamp=1748476800000&amp;signature=Iu8Bs9Xm-WZ2lnCVYHcGjo56IwDN9_l6h_P2q--roZk&amp;downloadName=Screenshot+2025-05-28+at+18.20.08.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-2-reference-types">2. Reference Types</h2>
<p><strong>Description</strong>: A reference type is like a treasure map. Instead of holding the treasure (data) directly, it holds a pointer (or address) to where the treasure is stored. When you give someone the map (assign it to another variable), you’re giving them a copy of the map, not the treasure. Both maps point to the same treasure, so changing the treasure affects everyone with a map.</p>
<p><strong>Key Characteristics</strong>:</p>
<ul>
<li><p>Stored in memory (on the heap), with variables holding a reference (pointer) to the data.</p>
</li>
<li><p>Includes classes, arrays, strings, and objects like List&lt;T&gt;.</p>
</li>
<li><p>When assigned, only the reference is copied, not the data itself.</p>
</li>
</ul>
<p><strong>Use Cases</strong>:</p>
<ul>
<li><p>Storing complex data like a customer’s full profile (name, address, etc.).</p>
</li>
<li><p>Managing lists or collections (e.g., a list of students).</p>
</li>
<li><p>Sharing data across multiple parts of a program where changes should be reflected everywhere.</p>
</li>
</ul>
<p><strong>Code Sample</strong>:</p>
<pre><code class="lang-csharp"><span class="hljs-keyword">using</span> System;
<span class="hljs-keyword">using</span> System.Collections.Generic;

<span class="hljs-keyword">class</span> <span class="hljs-title">Person</span>
{
    <span class="hljs-keyword">public</span> <span class="hljs-keyword">string</span> Name { <span class="hljs-keyword">get</span>; <span class="hljs-keyword">set</span>; }
}

<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
{
    <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>)</span>
    {
        <span class="hljs-comment">// Reference type: class</span>
        Person originalPerson = <span class="hljs-keyword">new</span> Person { Name = <span class="hljs-string">"Alice"</span> };
        Person referencePerson = originalPerson; <span class="hljs-comment">// Copies the reference, not the object</span>

        referencePerson.Name = <span class="hljs-string">"Bob"</span>; <span class="hljs-comment">// Changes the same object</span>

        Console.WriteLine(<span class="hljs-string">$"Original Person Name: <span class="hljs-subst">{originalPerson.Name}</span>"</span>); <span class="hljs-comment">// Bob</span>
        Console.WriteLine(<span class="hljs-string">$"Reference Person Name: <span class="hljs-subst">{referencePerson.Name}</span>"</span>); <span class="hljs-comment">// Bob</span>

        <span class="hljs-comment">// Reference type: List</span>
        List&lt;<span class="hljs-keyword">int</span>&gt; numbers = <span class="hljs-keyword">new</span> List&lt;<span class="hljs-keyword">int</span>&gt; { <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span> };
        List&lt;<span class="hljs-keyword">int</span>&gt; referenceNumbers = numbers; <span class="hljs-comment">// Copies the reference</span>
        referenceNumbers.Add(<span class="hljs-number">4</span>); <span class="hljs-comment">// Changes the same list</span>

        Console.WriteLine(<span class="hljs-string">"Numbers: "</span> + <span class="hljs-keyword">string</span>.Join(<span class="hljs-string">", "</span>, numbers)); <span class="hljs-comment">// 1, 2, 3, 4</span>
        Console.WriteLine(<span class="hljs-string">"Reference Numbers: "</span> + <span class="hljs-keyword">string</span>.Join(<span class="hljs-string">", "</span>, referenceNumbers)); <span class="hljs-comment">// 1, 2, 3, 4</span>
    }
}
</code></pre>
<p><strong>Example</strong>:</p>
<ul>
<li><p><strong>Scenario</strong>: A program tracks a person’s name and a list of scores.</p>
</li>
<li><p><strong>Reference Types</strong>: Person (a class) and List&lt;int&gt; (a collection).</p>
</li>
<li><p><strong>Behavior</strong>: Changing reference <a target="_blank" href="http://Person.Name">Person.Name</a> or adding to referenceNumbers affects the original because they point to the same data.</p>
</li>
<li><p><strong>Output :</strong>  </p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748453174720/b0b265a4-3669-454a-b221-14e3004382b4.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<h2 id="heading-3-nullable-types">3. Nullable Types</h2>
<p><strong>Description</strong>: A nullable type is like a box that can either hold a value (like a number) or be empty (null). Normally, value types (like int) must have a value, but nullable types let them be “nothing” if needed. It’s like saying, “I don’t know the answer yet” instead of being forced to pick a number.</p>
<p><strong>Key Characteristics</strong>:</p>
<ul>
<li><p>Applies to value types (e.g., int, double, bool) using the ? symbol (e.g., int?).</p>
</li>
<li><p>Can hold a value or null.</p>
</li>
<li><p>Useful when a value might not be available or applicable.</p>
</li>
</ul>
<p><strong>Use Cases</strong>:</p>
<ul>
<li><p>Storing optional data, like a middle initial that someone might not have.</p>
</li>
<li><p>Handling database fields that can be null (e.g., a “date of graduation” that’s not set yet).</p>
</li>
<li><p>Representing missing or unknown values in calculations.</p>
</li>
</ul>
<p><strong>Code Sample</strong></p>
<pre><code class="lang-csharp"><span class="hljs-keyword">using</span> System;

<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
{
    <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>)</span>
    {
        <span class="hljs-comment">// Nullable type: int?</span>
        <span class="hljs-keyword">int</span>? age = <span class="hljs-literal">null</span>; <span class="hljs-comment">// No value yet</span>
        Console.WriteLine(<span class="hljs-string">$"Age: <span class="hljs-subst">{(age.HasValue ? age.Value.ToString() : <span class="hljs-string">"Unknown"</span>)}</span>"</span>);

        age = <span class="hljs-number">30</span>; <span class="hljs-comment">// Now has a value</span>
        Console.WriteLine(<span class="hljs-string">$"Age: <span class="hljs-subst">{age}</span>"</span>);

        <span class="hljs-comment">// Nullable type: double?</span>
        <span class="hljs-keyword">double</span>? temperature = <span class="hljs-literal">null</span>;
        Console.WriteLine(<span class="hljs-string">$"Temperature: <span class="hljs-subst">{(temperature.HasValue ? temperature.Value.ToString() : <span class="hljs-string">"Not recorded"</span>)}</span>"</span>);

        temperature = <span class="hljs-number">72.5</span>;
        Console.WriteLine(<span class="hljs-string">$"Temperature: <span class="hljs-subst">{temperature}</span>"</span>);
    }
}
</code></pre>
<p><strong>Example</strong>:</p>
<ul>
<li><p><strong>Scenario</strong>: A form collects a person’s age and the room’s temperature, but the user might not provide either.</p>
</li>
<li><p><strong>Nullable Types</strong>: int? for age, double? for temperature.</p>
</li>
<li><p><strong>Behavior</strong>: The program checks if there’s a value using HasValue before using it.</p>
</li>
<li><p><strong>Output :</strong></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748453204937/ddf4980a-d18b-4ff9-b147-cef28e5d2a30.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Basic  Programming Terms : Variables , Predefined Types ,  Constant , Keywords &  Identifiers]]></title><description><![CDATA[1. Identifiers
Description :

These are the names you give to things you create in your code, like variables, constants, or classes. It’s like naming your pet—you pick a name, but it has to follow some rules (e.g., no spaces, can’t start with a numbe...]]></description><link>https://blog.codewithkhareem.com/basic-programming-terms-variables-predefined-types-constant-keywords-and-identifiers</link><guid isPermaLink="true">https://blog.codewithkhareem.com/basic-programming-terms-variables-predefined-types-constant-keywords-and-identifiers</guid><category><![CDATA[programming-terms]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Wed, 28 May 2025 17:06:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/GI1hwOGqGtE/upload/71ec78b50e3c72d7c4df636945fcb141.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-1-identifiers">1. Identifiers</h2>
<p><strong>Description</strong> :</p>
<ul>
<li><p>These are the names you give to things you create in your code, like variables, constants, or classes. It’s like naming your pet—you pick a name, but it has to follow some rules (e.g., no spaces, can’t start with a number).</p>
</li>
<li><p><strong>Scope</strong>: This is about where in your program a variable or constant can be used. It’s like deciding if a toy is only available in one room (local scope) or the whole house (global scope).</p>
</li>
</ul>
<p><strong>Rules for Identifiers</strong>:</p>
<ul>
<li><p>Can include letters, numbers, and underscores (_).</p>
</li>
<li><p>Must start with a letter or underscore.</p>
</li>
<li><p>Can’t be a keyword (e.g., int or class).</p>
</li>
</ul>
<p><strong>Use Cases</strong>:</p>
<ul>
<li><p>Naming variables to store data (e.g., userAge, totalPrice).</p>
</li>
<li><p>Defining constants for fixed values (e.g., MaxAttempts).</p>
</li>
<li><p>Controlling access to variables in different parts of the program (e.g., local variables in a method vs. global variables in a class).</p>
</li>
</ul>
<h3 id="heading-invalid-identifiers"><strong>Invalid Identifiers</strong></h3>
<p>Refers to names used for variables, functions, classes, etc., that <strong>don't follow the naming rules</strong> of the programming language you're using</p>
<p><strong>Examples</strong> :</p>
<ol>
<li><p>2cool : Starts with a digit.</p>
<ol>
<li>Valid Alternatives : cool2</li>
</ol>
</li>
<li><p>first-name : Contains a hyphen.</p>
<ol>
<li>Valid Alternatives : <code>first_name</code>, <code>firstName</code></li>
</ol>
</li>
<li><p>class : Reserved keyword</p>
<ol>
<li>Valid Alternatives : <code>className</code>, <code>_class</code></li>
</ol>
</li>
<li><p>user name : Contains a space</p>
<ol>
<li>Valid Alternatives: <code>user_name</code>, <code>userName</code></li>
</ol>
</li>
<li><p>total$amount : Special character <code>$</code></p>
<ol>
<li>Valid Alternatives: total_amount</li>
</ol>
</li>
</ol>
<blockquote>
<p>Note : If you're getting an "invalid identifier" error, check:</p>
</blockquote>
<ul>
<li><p><strong>Typos</strong></p>
</li>
<li><p><strong>Special characters</strong></p>
</li>
<li><p><strong>If the name is a reserved keyword</strong></p>
</li>
</ul>
<h2 id="heading-2-pre-defined-types"><strong>2. Pre-defined Types</strong></h2>
<p>Predefined types are like the basic ingredients C# gives you to work with, like flour, sugar, or eggs in baking. They’re the building blocks for storing things, like numbers, words, or true/false values.</p>
<p><strong>Common Types</strong></p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Sn</td><td>Type</td><td>C# Keyword</td><td>Values</td></tr>
</thead>
<tbody>
<tr>
<td>1.</td><td>Integer (Whole Numbers)</td><td>int</td><td>0,1,2,3 ,…</td></tr>
<tr>
<td>2.</td><td>Character</td><td>char</td><td>C, K ,@ , 2,</td></tr>
<tr>
<td>3.</td><td>Boolean</td><td>bool</td><td>true , false</td></tr>
<tr>
<td>4.</td><td>String (</td><td>string</td><td>“Ade is good”, “I am 5 years Old”</td></tr>
<tr>
<td>5.</td><td>Float (Decimal Numbers)</td><td>float or double</td><td>2.45, 4.8564</td></tr>
<tr>
<td>6.</td><td>Money ( Monetary decimal Numbers)</td><td>decimal</td><td>500.00M , 120M , …</td></tr>
</tbody>
</table>
</div><p><strong>Use Case:</strong></p>
<p>If you want to store someone’s age, you use the int type (for whole numbers). If you want their name, you use the string type (for words).</p>
<p><strong>Code Example: Using Pre-defined Types in C#</strong></p>
<pre><code class="lang-csharp"><span class="hljs-keyword">using</span> System;

<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
{
    <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>)</span>
    {
        <span class="hljs-comment">// Predefined types</span>
        <span class="hljs-keyword">int</span> age = <span class="hljs-number">25</span>;              <span class="hljs-comment">// Whole number</span>
        <span class="hljs-keyword">double</span> height = <span class="hljs-number">5.9</span>;       <span class="hljs-comment">// Decimal number</span>
        <span class="hljs-keyword">string</span> name = <span class="hljs-string">"Charlie"</span>;   <span class="hljs-comment">// Text</span>
        <span class="hljs-keyword">bool</span> isStudent = <span class="hljs-literal">true</span>;     <span class="hljs-comment">// True or False</span>
        <span class="hljs-keyword">char</span> grade = <span class="hljs-string">'A'</span>;          <span class="hljs-comment">// Single character</span>
        <span class="hljs-keyword">decimal</span> amount = <span class="hljs-number">5.9</span>M;       <span class="hljs-comment">// Decimal number for Money</span>

        Console.WriteLine(<span class="hljs-string">$"Name: <span class="hljs-subst">{name}</span>"</span>);
        Console.WriteLine(<span class="hljs-string">$"Age: <span class="hljs-subst">{age}</span>"</span>);
        Console.WriteLine(<span class="hljs-string">$"Height: <span class="hljs-subst">{height}</span> feet"</span>);
        Console.WriteLine(<span class="hljs-string">$"Is Student: <span class="hljs-subst">{isStudent}</span>"</span>);
        Console.WriteLine(<span class="hljs-string">$"Grade: <span class="hljs-subst">{grade}</span>"</span>);
    }
}
</code></pre>
<p>C# has ready-made types like int (numbers), string (text), bool (true/false), and others. You pick the right type for what you’re storing, just like picking the right ingredient for a recipe.</p>
<h2 id="heading-3-keywords">3. Keywords</h2>
<p>Keywords are special words that C# reserves for its own use. They’re like instructions the language understands, so you can’t use them as names for your variables or constants. Think of them as the “command words” the computer listens to.</p>
<p><strong>Use Cases</strong>:</p>
<ul>
<li><p>Defining program structure (e.g., class, if, for).</p>
</li>
<li><p>Specifying data types (e.g., int, string).</p>
</li>
<li><p>Controlling program flow (e.g., break, return).</p>
</li>
</ul>
<p><strong>Examples of Keywords</strong>:</p>
<ul>
<li><p>int, string, double (for data types).</p>
</li>
<li><p>if, else, for, while (for control flow).</p>
</li>
<li><p>class, static, void (for defining program structure).</p>
</li>
</ul>
<p><strong>Scenario</strong>: A program checks if someone is an adult based on their age.</p>
<ul>
<li><strong>Keywords Used</strong>: int (to define the age variable), if and else (to make a decision).</li>
</ul>
<pre><code class="lang-csharp"><span class="hljs-keyword">using</span> System;

<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
{
    <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>)</span>
    {
        <span class="hljs-comment">// Using keywords: int, if, else</span>
        <span class="hljs-keyword">int</span> age = <span class="hljs-number">20</span>;

        <span class="hljs-keyword">if</span> (age &gt;= <span class="hljs-number">18</span>)
        {
            Console.WriteLine(<span class="hljs-string">"You are an adult."</span>);
        }
        <span class="hljs-keyword">else</span>
        {
            Console.WriteLine(<span class="hljs-string">"You are a minor."</span>);
        }
    }
}
<span class="hljs-comment">// Output : </span>
You are a minor.
</code></pre>
<p><strong>Output :</strong></p>
<blockquote>
<p><strong>Note</strong>: Keywords can not be used as a name of things you define in your code . The Compiler already set a meaning to them so they are not valid identifiers. Only Valid identifiers you can use in naming stuff in your code like variables , constants , classes , methods etc.</p>
</blockquote>
<h2 id="heading-4-variables">4. Variables</h2>
<p>A variable is like a labeled box where you can store information, like a number or text, and change what’s inside the box whenever you need to. It’s a way to keep track of data in your program.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1654511953018/4vJegkJ0C.png" alt class="image--center mx-auto" /></p>
<blockquote>
<p>Variables: Changeable storage boxes for data</p>
</blockquote>
<p><strong>Use Cases</strong>:</p>
<ul>
<li><p>Storing user input (e.g., a player’s name in a game).</p>
</li>
<li><p>Keeping track of numbers for calculations (e.g., a score or total price).</p>
</li>
<li><p>Holding temporary data, like a counter in a loop.</p>
</li>
</ul>
<p><strong>Code Example: Creating Variable in C#</strong></p>
<pre><code class="lang-csharp"><span class="hljs-keyword">using</span> System;

<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
{
    <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>)</span>
    {
        <span class="hljs-comment">// Declare a variable to store a player's name</span>
        <span class="hljs-keyword">string</span> playerName = <span class="hljs-string">"Alice"</span>;
        <span class="hljs-comment">// Declare a variable to store a score</span>
        <span class="hljs-keyword">int</span> score = <span class="hljs-number">100</span>;

        Console.WriteLine(<span class="hljs-string">$"Player: <span class="hljs-subst">{playerName}</span>, Score: <span class="hljs-subst">{score}</span>"</span>);

        <span class="hljs-comment">// Change the variable values</span>
        playerName = <span class="hljs-string">"Bob"</span>;
        score = <span class="hljs-number">150</span>;

        Console.WriteLine(<span class="hljs-string">$"Player: <span class="hljs-subst">{playerName}</span>, Score: <span class="hljs-subst">{score}</span>"</span>);
    }
}

<span class="hljs-comment">// Output</span>
Player: Alice, Score: <span class="hljs-number">100</span>
Player: Bob, Score: <span class="hljs-number">150</span>
</code></pre>
<p><strong>Example</strong>:</p>
<ul>
<li><p><strong>Scenario</strong>: A game tracks a player’s score.</p>
</li>
<li><p><strong>Variable</strong>: score holds the value 100. Later, it changes to 150 when the player earns more points.</p>
</li>
</ul>
<p><mark>Console.Writeline() </mark> : This is how you display on a Console(Terminal) the value stored in your variable</p>
<h2 id="heading-5-constants">5. Constants</h2>
<p>A constant is like a variable, but its value is locked in and can’t be changed once set. It’s like writing a value in permanent marker on a box—you can’t erase or overwrite it.</p>
<blockquote>
<p>Constants: Unchangeable values</p>
</blockquote>
<p><strong>Use Cases</strong>:</p>
<ul>
<li><p>Defining fixed values like tax rates or mathematical constants (e.g., π).</p>
</li>
<li><p>Setting configuration values that shouldn’t change, like maximum retries in a program.</p>
</li>
<li><p>Ensuring critical values remain unchanged to avoid bugs.</p>
</li>
</ul>
<p><strong>Code Sample</strong>:</p>
<pre><code class="lang-csharp"><span class="hljs-keyword">using</span> System;

<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
{
    <span class="hljs-comment">// Declare a constant for the tax rate</span>
    <span class="hljs-keyword">const</span> <span class="hljs-keyword">double</span> TaxRate = <span class="hljs-number">0.08</span>;

    <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>)</span>
    {
        <span class="hljs-keyword">double</span> price = <span class="hljs-number">100.00</span>;
        <span class="hljs-keyword">double</span> tax = price * TaxRate;

        Console.WriteLine(<span class="hljs-string">$"Price: $<span class="hljs-subst">{price}</span>, Tax: $<span class="hljs-subst">{tax}</span>, Total: $<span class="hljs-subst">{price + tax}</span>"</span>);

        <span class="hljs-comment">// This would cause an error: TaxRate = 0.10; // Constants can't be changed</span>
    }
}
</code></pre>
<p><strong>Example</strong>:</p>
<ul>
<li><p><strong>Scenario</strong>: A shopping app calculates tax on a $100 item using a fixed tax rate of 8%.</p>
</li>
<li><p><strong>Constant</strong>: TaxRate is set to 0.08 and never changes.</p>
</li>
<li><p><strong>Output</strong> :</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748451769198/6646528f-a81c-478b-9305-f075615fd383.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Difference between dotnet Restore, Build &  Run ( 01-D)]]></title><description><![CDATA[Some developers struggle to understand what happens when you run these 3 commands. Understanding the difference let you made better decisions during the development workflow especially when creating a CI/CD pipeline to ship your code into different e...]]></description><link>https://blog.codewithkhareem.com/difference-between-dotnet-restore-build-and-run-01-d</link><guid isPermaLink="true">https://blog.codewithkhareem.com/difference-between-dotnet-restore-build-and-run-01-d</guid><category><![CDATA[dotnet-cli]]></category><category><![CDATA[dotnet]]></category><category><![CDATA[cli]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Wed, 28 May 2025 16:05:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/jLwVAUtLOAQ/upload/3cabf9b962a8eb2f42f736686616cfe4.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Some developers struggle to understand what happens when you run these 3 commands. Understanding the difference let you made better decisions during the development workflow especially when creating a CI/CD pipeline to ship your code into different environment.</p>
<h3 id="heading-dotnet-restore"><strong>Dotnet Restore :</strong></h3>
<ul>
<li><p>Downloads all the external packages (NuGet packages) your project depends on. Think of it like , Checking your shopping list and downloading everything from the store <strong>before you start cooking</strong></p>
<h3 id="heading-what-it-does">What it does:</h3>
<ul>
<li><p>Reads your <code>.csproj</code> or <code>packages.config</code></p>
</li>
<li><p>Connects to NuGet</p>
</li>
<li><p>Downloads the required packages into your local machine (usually in <code>~/.nuget/packages/</code>)</p>
</li>
<li><p>Usually happens <strong>automatically</strong> with <code>dotnet build</code> in .NET Core and later versions</p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-dotnet-build"><strong>Dotnet Build :</strong></h3>
<ul>
<li><p>Compiles your project source code into a <code>.dll</code> or <code>.exe</code> file. Think of it like, Cooking the meal using the ingredients you got from the store.</p>
<h3 id="heading-what-it-does-1">What it does:</h3>
<ul>
<li><p>Runs the compiler (Roslyn)</p>
</li>
<li><p>Turns your <code>.cs</code> files into IL (Intermediate Language)</p>
</li>
<li><p>Outputs into the <code>/bin/Debug</code> or <code>/bin/Release</code> folder</p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-dotnet-run"><strong>Dotnet Run</strong></h3>
<ul>
<li><ul>
<li><p>The <code>dotnet run</code> command <strong>builds and immediately executes your .NET application</strong>. Think of it like pressing the <strong>"Play" button</strong> in Visual Studio — your app compiles and launches</p>
<p>    <strong>What Happens When You Run</strong></p>
<p>    It performs these steps under the hood:</p>
<ol>
<li><p><strong>Restores</strong> NuGet packages (if needed)</p>
</li>
<li><p><strong>Builds</strong> the project (compiles code)</p>
</li>
<li><p><strong>Runs</strong> the app</p>
</li>
</ol>
</li>
</ul>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Development Tools for building modern C# or .Net App & Most Used Cli Commands ( 01-C)]]></title><description><![CDATA[1 .Net CLI :
This is the command line interface to develop .net applications . You can use the cli to create a solution , create new application, add application to solution, build , test , run , publish applications and many more
Most Common .Net CL...]]></description><link>https://blog.codewithkhareem.com/development-tools-for-building-modern-c-or-net-app-and-most-used-cli-commands-01-c</link><guid isPermaLink="true">https://blog.codewithkhareem.com/development-tools-for-building-modern-c-or-net-app-and-most-used-cli-commands-01-c</guid><category><![CDATA[C#]]></category><category><![CDATA[.NET]]></category><category><![CDATA[cli]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Fri, 09 May 2025 17:40:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/cckf4TsHAuw/upload/b9b8df243a2e87c45af59a9dd8c39739.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-1-net-cli">1 .Net CLI :</h2>
<p>This is the command line interface to develop .net applications . You can use the cli to create a solution , create new application, add application to solution, build , test , run , publish applications and many more</p>
<p>Most Common .Net CLI Commands you will need on a regular basis as a .Net developer</p>
<pre><code class="lang-bash">&gt; dotnet new --list  <span class="hljs-comment"># List templates for all types of application</span>
&gt; dotnet --info <span class="hljs-comment"># Check SDK info</span>
&gt; dotnet --version <span class="hljs-comment"># Check SDK version</span>

&gt; dotnet new sln -n &lt;MySolution&gt; <span class="hljs-comment"># Creates a new solution file named MySolution.sln</span>

&gt; dotnet new console -n &lt;MyApp&gt; <span class="hljs-comment"># Creates a new Console App in a folder called MyApp</span>

&gt; dotnet new webapi -n MyApi           <span class="hljs-comment"># ASP.NET Core Web API</span>
&gt; dotnet new mvc -n MyMvcApp           <span class="hljs-comment"># ASP.NET MVC</span>
&gt; dotnet new blazorserver -n MyBlazor  <span class="hljs-comment"># Blazor Server app</span>
&gt; dotnet new classlib -n MyLibrary     <span class="hljs-comment"># Class library</span>

&gt; dotnet sln MySolution.sln add MyApp/MyApp.csproj  <span class="hljs-comment"># Adds the MyApp project to the solution file</span>

&gt; dotnet build <span class="hljs-comment"># Compiles the app and checks for errors.</span>
&gt; dotnet build MyApp/MyApp.csproj <span class="hljs-comment"># You can specify a project </span>
&gt; dotnet restore <span class="hljs-comment"># Restore packages or dependencies</span>

&gt; dotnet <span class="hljs-built_in">test</span> <span class="hljs-comment"># Run Tests</span>

&gt; dotnet run --project MyApp <span class="hljs-comment">#Runs the specified project. </span>
&gt; dotnet run

&gt; dotnet publish -c Release -o ./publish  <span class="hljs-comment"># Builds the app and prepares it for deployment into the ./publish folder.</span>
&gt; dotnet publish MyApp/MyApp.csproj -c Release -o ./publish
</code></pre>
<h2 id="heading-2-visual-studio-code-vs-code"><strong>2. Visual Studio Code (VS Code)</strong></h2>
<p>A <strong>lightweight, fast, and customizable code editor</strong> from Microsoft. Ideal for web, cloud, and cross-platform development.</p>
<ol start="2">
<li><p><strong>Best for</strong>:</p>
<ul>
<li><p>Web developers</p>
</li>
<li><p>.NET Core, JavaScript, Python, Go, etc.</p>
</li>
<li><p>Cross-platform use (Windows, macOS, Linux)</p>
</li>
<li><p><strong>Download link</strong> : 👉 <a target="_blank" href="https://code.visualstudio.com/">https://code.visualstudio.com/</a></p>
</li>
</ul>
</li>
</ol>
<h2 id="heading-3-visual-studio-full-ide"><strong>3. Visual Studio (Full IDE)</strong></h2>
<p>A <strong>full-featured Integrated Development Environment (IDE)</strong> mainly used for .NET and C++ development. It includes advanced debugging, UI designers, code generation, profiling tools, and more.</p>
<p><strong>Best for</strong>:</p>
<ul>
<li><p>Windows users building enterprise apps</p>
</li>
<li><p><a target="_blank" href="http://ASP.NET">ASP.NET</a> Core, Blazor, WPF, Xamarin, and WinForms</p>
</li>
<li><p>Serious .NET development and large solutions</p>
</li>
</ul>
<p>🔗 <strong>Download link</strong>:</p>
<p>👉 <a target="_blank" href="https://visualstudio.microsoft.com/">https://visualstudio.microsoft.com/</a></p>
<p><em>Choose “Community Edition” if you’re an individual or student — it’s free</em></p>
<h2 id="heading-4-wsl-2"><strong>4. WSL 2</strong></h2>
<p>WSL 2 lets you <strong>run a Linux environment directly inside Windows</strong>, including the Linux command line, tools, and apps.</p>
<p>🔹 <strong>Best for</strong>:</p>
<ul>
<li><p>Developers who want Linux tools on Windows</p>
</li>
<li><p>Running Docker, bash, Python, Node, etc.</p>
</li>
<li><p>Full-stack developers working in Linux-based environments</p>
</li>
</ul>
<p>🔗 <strong>Download + install guide</strong>:</p>
<p>👉 <a target="_blank" href="https://learn.microsoft.com/windows/wsl/install">https://learn.microsoft.com/windows/wsl/install</a></p>
<p><em>⚠️ You need Windows 10 version 2004+ or Windows 11</em></p>
<h2 id="heading-5-docker-desktop"><strong>5. Docker Desktop</strong></h2>
<ol start="2">
<li><p>A tool that lets you <strong>build, run, and manage containers</strong> on your local machine. Docker Desktop includes everything needed to run containers using Docker Engine.</p>
<p> 🔹 <strong>Best for</strong>:</p>
<ul>
<li><p>Creating isolated dev/test environments</p>
</li>
<li><p>Running microservices and APIs</p>
</li>
<li><p>Learning DevOps, Kubernetes, and CI/CD</p>
</li>
</ul>
</li>
</ol>
<p>    🔗 <strong>Download link</strong>:</p>
<p>    👉 <a target="_blank" href="https://www.docker.com/products/docker-desktop/">https://www.docker.com/products/docker-desktop/</a></p>
<p>    <em>⚠️ Requires WSL 2 on Windows for Linux container support.</em></p>
<h2 id="heading-6-databases-optional"><strong>6. Databases (Optional)</strong></h2>
<p>If your application needs to connect to a database , then you have to choose from this major databases .-</p>
<ul>
<li><p>Relational Database</p>
<ul>
<li><p>Sql Lite</p>
</li>
<li><p>MS SQL</p>
</li>
<li><p>My SQL</p>
</li>
<li><p>Postgres SQL</p>
</li>
</ul>
</li>
<li><p>Document Database</p>
<ul>
<li>Mongo DB</li>
</ul>
</li>
<li><p>Cache</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Concept & Important  C# Terms ( 01B - Beginner)]]></title><description><![CDATA[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 platfor...]]></description><link>https://blog.codewithkhareem.com/concept-and-important-c-terms-01b-beginner</link><guid isPermaLink="true">https://blog.codewithkhareem.com/concept-and-important-c-terms-01b-beginner</guid><category><![CDATA[C#]]></category><category><![CDATA[.NET]]></category><category><![CDATA[Nuget]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Fri, 09 May 2025 17:29:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1746810606270/5414034d-be83-486d-b261-a547d2797eba.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There are some important concepts and terms a beginner .net developer needs to understant. Here, i will shed more light into them in details.</p>
<h2 id="heading-1-net-sdk">1 .Net SDK</h2>
<p>An <strong>SDK is a collection of tools, libraries, documentation, and code samples</strong> 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.</p>
<blockquote>
<p><strong>SDK</strong> = <strong>Runtime + developer tools</strong> to <strong>build, test, and run</strong> applications + templates</p>
</blockquote>
<ul>
<li><p>It includes compilers, build tools, debuggers, and libraries.</p>
</li>
<li><p>Lets you <strong>write, compile, and run</strong> code.</p>
</li>
<li><p>Use case : <strong>Developer machine</strong></p>
</li>
<li><p>Examples : .NET SDK, JDK, Android SDK</p>
</li>
</ul>
<p>🧠 Think of it like:</p>
<blockquote>
<p>“I have everything I need to <strong>create</strong> and <strong>run</strong> the movie.”</p>
</blockquote>
<p>You can install multiple versions of .Net Sdk</p>
<pre><code class="lang-tsx">&gt; dotnet --list-sdks :  shows different versions of .Net SDK installed on your system.

&gt; dotnet --version : To view the current version
</code></pre>
<p>By default , the latest version is used.</p>
<h2 id="heading-2-net-runtime">2 .Net Runtime</h2>
<p>A <strong>Runtime</strong> is the minimum environment needed to <strong>run an application</strong> built with a specific framework.</p>
<ul>
<li><p>It <strong>executes</strong> precompiled apps</p>
</li>
<li><p>It does <strong>not</strong> include tools to create or build apps</p>
</li>
<li><p>Use Case : <strong>End-user or production servers</strong></p>
</li>
<li><p>Example: <code>.NET Runtime</code>, <code>Java Runtime Environment (JRE)</code>, <code>Node.js Runtime</code>.</p>
</li>
</ul>
<p>🧠 Think of it like:</p>
<blockquote>
<p>“I can watch the movie, but I can't make or edit it.”</p>
</blockquote>
<pre><code class="lang-tsx">&gt; dotnet --list-runtimes : To view which runtime is installed on the system
</code></pre>
<h2 id="heading-ia"> </h2>
<p>3 .Net CLR</p>
<p>The <strong>Common Language Runtime (CLR)</strong> is the <strong>engine</strong> or <strong>brain</strong> of the .NET framework that actually <strong>runs your .NET code.</strong> 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</p>
<h2 id="heading-nuget-packages">Nuget Packages</h2>
<p>A <strong>NuGet package</strong> is like a <strong>ready-made box of code</strong> that you can <strong>plug into your .NET project</strong> to save time. They help you <strong>add features</strong> to your app without writing it all yourself. They are available on Nuget Server at <a target="_blank" href="https://www.nuget.com">https://www.nuget.com</a></p>
<p>🧠 Think of it like:</p>
<blockquote>
<p>You're building a LEGO house, and instead of building every piece from scratch, you buy a <strong>pre-made door, window, or roof</strong> and snap it into your project. That’s what NuGet packages do — they give you reusable building blocks of functionality</p>
</blockquote>
<p>A <code>.nupkg</code> (NuGet package) file typically contains:</p>
<ul>
<li><p><strong>Compiled DLLs</strong> (libraries)</p>
</li>
<li><p><strong>Metadata</strong> (like version, author, description)</p>
</li>
<li><p>Optional dependencies (other packages it needs)</p>
</li>
</ul>
<p>Adding &amp; Removing Nuget Package in your Project</p>
<pre><code class="lang-tsx">&gt; dotnet add package &lt;Package-Name&gt; # Adding package to your project 
&gt; dotnet remove package &lt;PackageName&gt;  # Remove package
Examples : 
&gt; dotnet remove package Newtonsoft.Json
</code></pre>
<h3 id="heading-updating-packages">Updating Packages</h3>
<p>The .NET CLI doesn't have a direct <code>dotnet update package</code> command. Instead, Re-add the package with a newer version</p>
<pre><code class="lang-tsx">dotnet add package &lt;PackageName&gt; --version &lt;Version&gt;
Example : 
&gt; dotnet add package Newtonsoft.Json --version 13.0.2
</code></pre>
<h3 id="heading-nuget-package-source">NuGet Package Source</h3>
<p>A <strong>NuGet Package Source</strong> is a <strong>location where your .NET project looks for NuGet packages</strong> — either to install, restore, or update them. Think of it as a feed (like a repository or URL) that contains packages.</p>
<pre><code class="lang-tsx">&gt; dotnet nuget add source &lt;SourceURL&gt; --name &lt;SourceName&gt; # Adding a package source

Example : 
&gt; dotnet nuget add source &lt;https://api.nuget.org/v3/index.json&gt; --name NuGetOrg
</code></pre>
<p><strong>Optional: Add credentials (e.g., for private feeds)</strong></p>
<pre><code class="lang-tsx">
&gt; dotnet nuget add source &lt;SourceURL&gt; --name &lt;Name&gt; --username &lt;User&gt; --password &lt;Pass&gt; --store-password-in-clear-text
</code></pre>
<h3 id="heading-other-nuget-sources-command"><strong>Other Nuget Sources Command</strong></h3>
<pre><code class="lang-tsx">&gt; dotnet nuget list source # List Package Sources

&gt; dotnet nuget remove source &lt;SourceName&gt; # Remove a Package Source
Example : 
&gt; dotnet nuget remove source NuGetOrg
</code></pre>
<h3 id="heading-common-types-of-nuget-package-sources"><strong>🏗️ Common Types of NuGet Package Sources</strong></h3>
<ol>
<li><p><strong>Official NuGet Source (default):</strong></p>
<ul>
<li><p>URL: <a target="_blank" href="https://api.nuget.org/v3/index.json"><code>https://api.nuget.org/v3/index.json</code></a></p>
</li>
<li><p>Contains public packages like <code>Newtonsoft.Json</code>, <code>Serilog</code>, etc.</p>
</li>
</ul>
</li>
<li><p><strong>Private/Internal Feeds:</strong></p>
<ul>
<li><p>Hosted on Azure Artifacts, GitHub Packages, or internal servers.</p>
</li>
<li><p>Used to share company-specific or proprietary packages.</p>
</li>
</ul>
</li>
<li><p><strong>Local Feeds:</strong></p>
<ul>
<li><p>A folder on your machine (e.g., <code>C:\\packages</code>) that contains <code>.nupkg</code> files.</p>
</li>
<li><p>Useful for testing or offline development.</p>
</li>
</ul>
</li>
</ol>
<p><strong>📁 Where Sources Are Stored</strong></p>
<p>NuGet sources are usually listed in a config file:</p>
<ul>
<li><p><strong>User-wide config:</strong> <code>~/.nuget/NuGet/NuGet.Config</code> (Linux/macOS) or <code>%appdata%\\NuGet\\NuGet.Config</code> (Windows)</p>
</li>
<li><p><strong>Project-specific config:</strong> <code>NuGet.Config</code> in your repo/project root</p>
</li>
</ul>
<p>⚙️ Example of NuGet.Config</p>
<pre><code class="lang-tsx">&lt;configuration&gt;
  &lt;packageSources&gt;
    &lt;add key="nuget.org" value="&lt;https://api.nuget.org/v3/index.json&gt;" /&gt;
    &lt;add key="MyPrivateFeed" value="&lt;https://myserver.com/nuget&gt;" /&gt;
    &lt;add key="Local" value="C:\\MyPackages" /&gt;
  &lt;/packageSources&gt;
&lt;/configuration&gt;
</code></pre>
]]></content:encoded></item><item><title><![CDATA[C#, .Net History , Versions & Application Types ( 01-A - Beginner)]]></title><description><![CDATA[Most absolute Beginners always struggle with where to start from when programming C# or developing .Net Application. In this article i will be diving into all major concepts , terms they will need to get started with C# programming language and .Net ...]]></description><link>https://blog.codewithkhareem.com/c-net-history-versions-and-application-types-01-a</link><guid isPermaLink="true">https://blog.codewithkhareem.com/c-net-history-versions-and-application-types-01-a</guid><category><![CDATA[C#]]></category><category><![CDATA[.NET]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[Olayinka U. Kareem]]></dc:creator><pubDate>Thu, 08 May 2025 20:49:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1746725857016/0485921c-6597-40cb-b0f5-7449c54aeacd.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most absolute Beginners always struggle with where to start from when programming C# or developing .Net Application. In this article i will be diving into all major concepts , terms they will need to get started with C# programming language and .Net development. This is 1st part of my C# Language Series.</p>
<h3 id="heading-c-language"><strong>C# Language</strong></h3>
<p>It’s a Programming language used to write code that runs on the .NET platform and Unity framework . It designed by Microsoft, led by Anders Hejlsberg. C# has the following core features which makes highly suitable for modern enterprise application development.</p>
<p><strong>Features</strong>:</p>
<ul>
<li><p>Fully object-oriented with support for encapsulation, inheritance, and polymorphism</p>
</li>
<li><p>Type Safety : Strongly typed, Static typing &amp; Generic types for type-safe collections and algorithms</p>
</li>
<li><p>Modern language features like LINQ, async/await, pattern matching, etc.</p>
</li>
<li><p>Memory Management : Automatic garbage collection. No direct pointer manipulation (except in unsafe context)</p>
</li>
<li><p>LINQ (Language Integrated Query) for data manipulation</p>
</li>
<li><p>Async/await pattern for asynchronous programming</p>
</li>
<li><p>Cross-platform via .NET Core/.NET 5+ (Windows, macOS, Linux)</p>
</li>
<li><p>Compatible with Microsoft ecosystem (Azure, Windows, etc.)</p>
</li>
<li><p>Native support for web, desktop, mobile, and cloud applications</p>
</li>
<li><p>Comprehensive standard library</p>
</li>
</ul>
<p><strong>Usage :</strong></p>
<p>C# can be used to write or build the following applications:</p>
<ol>
<li><p>Web Applications ( MVC, Razor &amp; Blazor )</p>
</li>
<li><p>Web APIs ( <a target="_blank" href="http://ASP.Net">Asp.Net</a> Web API )</p>
</li>
<li><p>Desktop Applications ( Win Form , WPF, UWP, Win UI, MAUI )</p>
</li>
<li><p>Mobile Applications ( MAUI ) - Cross - Platform</p>
</li>
<li><p>Games ( Unity ) : used in buidling 2D, 3D , Augmented Reality , Virtual Reality Applications.</p>
</li>
</ol>
<h3 id="heading-net-framework"><strong>.Net Framework</strong></h3>
<p>It’s a framework or platform for building enterprise applications. It was introduced in 2000, built for <strong>windows operating system only</strong>. Provides a runtime environment and libraries to build and run applications (web, desktop, mobile, cloud, etc.) It Supports multiple languages including <strong>C#</strong>, <strong>F#</strong>, <a target="_blank" href="http://VB.NET"><strong>VB.NET</strong>, etc</a>. Nowadays <a target="_blank" href="http://VB.NET">C# ha</a>s become the go to language for .Net development.</p>
<h3 id="heading-net-core-framework"><strong>.Net Core Framework</strong></h3>
<p><strong>.NET Core</strong> is a <strong>cross-platform</strong>, <strong>open-source</strong> framework developed by <strong>Microsoft</strong> for building modern applications. It was introduced to overcome the limitations of the original <strong>.NET Framework</strong>, especially its <strong>Windows-only</strong> nature. It was released in 2016 which support most of the old features in .net with better improvement in performance and tooling.</p>
<h3 id="heading-unified-net-framework"><strong>Unified .Net Framework</strong></h3>
<p>The term <strong>"Unified .NET Framework"</strong> generally refers to the <strong>.NET 5+ platform</strong>, which consolidates the previously separate .NET technologies into a single, unified platform for building all types of applications. It started with .Net 5 launched in 2020 , “Core” was removed . No more Old windows only .Net and Cross platform .Net Core , now we have <strong>.Net</strong> as a unified framework .</p>
<p>Going forward , you can hear <strong>.Net 5, 6, 7, 8 , 9 , 10</strong> et.c . With a single BCL ( Base Class Library) and a single SDK ( Software Development Kit) , you can now build</p>
<ul>
<li><p>Web apps</p>
</li>
<li><p>APIs</p>
</li>
<li><p>Desktop apps (WinForms, WPF)</p>
</li>
<li><p>Mobile apps (via MAUI)</p>
</li>
<li><p>Cloud apps</p>
</li>
<li><p>Games (via Unity)</p>
</li>
<li><p>IoT apps</p>
</li>
</ul>
<h3 id="heading-net-version-support-length">.Net Version Support Length</h3>
<p>When you’re working in the new era of .Net, you should know about versions and different support cycles. .Net releases differ based on Current or Long Term Support (LTS)</p>
<ul>
<li><p><strong>LTS</strong> : are versions supported at least 3 years or 1 year after the next LTS version is released. (recommended for production apps)</p>
</li>
<li><p><strong>Standard/ Short Term Support</strong> : Supported <strong>for</strong> 18 months (good for early access to new features)</p>
</li>
<li><p><strong>.Net 1, .Net 1.1 , .Net 2.1 , .Net 3.1 , .Net 6 , .Net 8 &amp; .Net 10</strong> ( to be released Nov, 2025) : Are all LTS Support Level</p>
</li>
<li><p><strong>.Net 2.0 , .Net 2.2 , .Net 3, .Net 5 &amp; .Net 7</strong> : STS</p>
</li>
</ul>
<p>Microsoft follows a <strong>yearly release</strong> schedule for .NET:</p>
<ul>
<li><p><strong>Even-numbered</strong> years (e.g., .NET 6, .NET 8) → LTS</p>
</li>
<li><p><strong>Odd-numbered</strong> years (e.g., .NET 5, .NET 7, .NET 9) → STS</p>
</li>
</ul>
<h2 id="heading-application-types">Application Types</h2>
<p>As a developer , the major reason you learn programming is to solve some problems and build applications. The following are various application types you can build with C# and .Net .</p>
<h3 id="heading-1-console-application">🔹 1. <strong>Console Application</strong></h3>
<p>✅ What It Is: A <strong>text-based application</strong> that runs in a terminal or command prompt window — no graphical interface.</p>
<p><strong>✅ Use Cases:</strong></p>
<ul>
<li><p>Utility tools</p>
</li>
<li><p>Data migration scripts</p>
</li>
<li><p>Test programs</p>
</li>
<li><p>Background processes</p>
</li>
</ul>
<p>✅ Create With CLI:</p>
<pre><code class="lang-tsx">&gt; dotnet new console -n MyConsoleApp
</code></pre>
<p>✅ Example Code:</p>
<pre><code class="lang-tsx">Console.WriteLine("Hello, world!");
</code></pre>
<h3 id="heading-2-web-application">🌐 2. <strong>Web Application</strong></h3>
<p><strong>✅ What It Is:</strong></p>
<p>An application that runs in a <strong>web browser</strong>. Built using <a target="_blank" href="http://ASP.NET"><strong>ASP.NET</strong></a> <strong>Core</strong>, often with Razor Pages, MVC, or Blazor for a single page application. Blazor is the .net equivalent of popular SPA like React, Angular &amp; Vue.js.</p>
<p>✅ <strong>Use Cases:</strong></p>
<ul>
<li><p>E-commerce websites</p>
</li>
<li><p>Dashboards</p>
</li>
<li><p>Admin panels</p>
</li>
<li><p>Web-based CRMs</p>
</li>
</ul>
<p><strong>✅ Frameworks:</strong></p>
<ul>
<li><p><a target="_blank" href="http://ASP.NET">ASP.NET</a> Core MVC</p>
</li>
<li><p>Blazor Server / Blazor WebAssembly</p>
</li>
<li><p>Razor Pages</p>
</li>
</ul>
<p><strong>✅ Create With CLI:</strong></p>
<pre><code class="lang-tsx">&gt; dotnet new mvc -n MyWebApp
</code></pre>
<h3 id="heading-3-web-services-api">🔗 3. <strong>Web Services / API</strong></h3>
<p><strong>✅ What It Is:</strong></p>
<p>Backend services (usually RESTful APIs) that expose <strong>endpoints</strong> which can be consumed by web apps, mobile apps, IoT devices, etc.</p>
<p><strong>✅ Use Cases:</strong></p>
<ul>
<li><p>Backend for mobile apps</p>
</li>
<li><p>Microservices</p>
</li>
<li><p>Public/Private APIs</p>
</li>
</ul>
<p><strong>✅ Framework:</strong></p>
<ul>
<li><a target="_blank" href="http://ASP.NET">ASP.NET</a> Core Web API</li>
</ul>
<p><strong>✅ Create With CLI:</strong></p>
<pre><code class="lang-tsx">&gt; dotnet new webapi -n MyApi
</code></pre>
<h3 id="heading-4-desktop-application">🖥️ 4. <strong>Desktop Application</strong></h3>
<p><strong>✅ What It Is:</strong></p>
<p>Apps that run on <strong>Windows</strong> (sometimes cross-platform) desktop computers. Built with GUI frameworks like <strong>WPF</strong>, <strong>WinForms</strong>, or <strong>MAUI</strong>.</p>
<p><strong>✅ Use Cases:</strong></p>
<ul>
<li><p>Accounting software</p>
</li>
<li><p>Point-of-sale (POS) systems</p>
</li>
<li><p>Rich client applications</p>
</li>
</ul>
<p><strong>✅ Technologies:</strong></p>
<ul>
<li><p>WinForms (oldest)</p>
</li>
<li><p>WPF (modern, XAML-based)</p>
</li>
<li><p>.NET MAUI (for cross-platform desktop + mobile)</p>
</li>
</ul>
<p><strong>✅ Create WPF Project:</strong></p>
<pre><code class="lang-tsx">&gt; dotnet new wpf -n MyDesktopApp
</code></pre>
<h3 id="heading-5-mobile-application"><strong>📱 5. Mobile Application</strong></h3>
<p><strong>✅ What It Is:</strong></p>
<p>Apps that run on <strong>Android and iOS</strong>, built using <strong>.NET MAUI</strong> or formerly Xamarin.</p>
<p><strong>✅ Use Cases:</strong></p>
<ul>
<li><p>Business mobile apps</p>
</li>
<li><p>Social network apps</p>
</li>
<li><p>Hybrid cross-platform tools</p>
</li>
<li><p>Consumer apps (To-do, Finance, etc.)</p>
</li>
</ul>
<p><strong>✅ Framework:</strong></p>
<ul>
<li><p>.NET MAUI (recommended)</p>
</li>
<li><p>Xamarin (older, being phased out)</p>
</li>
</ul>
<p><strong>✅ Create With CLI:</strong></p>
<pre><code class="lang-tsx">&gt; dotnet new maui -n MyMobileApp
</code></pre>
<h3 id="heading-6-class-library">📚 6. <strong>Class Library</strong></h3>
<p><strong>✅ What It Is:</strong></p>
<p>A <strong>reusable collection of code</strong> (DLL) that can be shared across multiple projects.</p>
<p><strong>✅ Use Cases:</strong></p>
<ul>
<li><p>Shared business logic</p>
</li>
<li><p>Utility/helper functions</p>
</li>
<li><p>Domain models</p>
</li>
<li><p>Custom libraries (NuGet packages)</p>
</li>
</ul>
<p><strong>✅ Create With CLI:</strong></p>
<pre><code class="lang-tsx">&gt; dotnet new classlib -n MyLibrary
</code></pre>
<h2 id="heading-7-dev-tools">🛠️ 7. <strong>Dev Tools</strong></h2>
<p><strong>✅ What It Is:</strong></p>
<p>Tools or apps built <strong>to assist developers</strong>, often running as CLI apps, analyzers, generators, or even IDE extensions.</p>
<p><strong>✅ Use Cases:</strong></p>
<ul>
<li><p>Code generators</p>
</li>
<li><p>Linting tools</p>
</li>
<li><p>Project scaffolding</p>
</li>
<li><p>CLI-based workflows</p>
</li>
</ul>
<p><strong>✅ Can be built with:</strong></p>
<ul>
<li><p>Console apps</p>
</li>
<li><p>Roslyn analyzers</p>
</li>
<li><p>Custom CLI commands (<code>System.CommandLine</code>, <code>Spectre.Console</code>)</p>
</li>
</ul>
]]></content:encoded></item></channel></rss>