<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ramkumar Radhakrishnan</title>
    <description>The latest articles on DEV Community by Ramkumar Radhakrishnan (@ramkumar_radhakrishnan).</description>
    <link>https://dev.to/ramkumar_radhakrishnan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F668287%2Fd4bb2e29-b47b-4573-b4ce-bdb941aa0845.jpeg</url>
      <title>DEV Community: Ramkumar Radhakrishnan</title>
      <link>https://dev.to/ramkumar_radhakrishnan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ramkumar_radhakrishnan"/>
    <language>en</language>
    <item>
      <title>Senior C#/.NET Developer Learning Plan. Day - 01.</title>
      <dc:creator>Ramkumar Radhakrishnan</dc:creator>
      <pubDate>Sat, 16 Aug 2025 18:13:45 +0000</pubDate>
      <link>https://dev.to/ramkumar_radhakrishnan/senior-cnet-developer-learning-planday-01-4408</link>
      <guid>https://dev.to/ramkumar_radhakrishnan/senior-cnet-developer-learning-planday-01-4408</guid>
      <description>&lt;p&gt;Senior C#/.NET Developer Learning Plan&lt;br&gt;
Duration: 12 Weeks (60 Sessions) | Daily Commitment: 1 Hour | Schedule: Monday to Friday&lt;/p&gt;

&lt;h2&gt;
  
  
  Day - 01
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Topics - C# 10-12 Features&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Global Using Directives 
*&lt;em&gt;Explanation *&lt;/em&gt;- This feature allows you to declare common namespaces globally, eliminating the need to add using statements in every file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Real-world use:&lt;/strong&gt; In large projects, many files might use the same set of namespaces (e.g., System, System.Collections.Generic, System.Linq). Global usings can significantly reduce the boilerplate code at the top of each file, making code cleaner and more readable.&lt;/p&gt;

&lt;p&gt;Code Samples. &lt;/p&gt;

&lt;h2&gt;
  
  
  GlobalUsing.cs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;global using System;
global using System.Collections.Generic;
global using System.Linq;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Program.cs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Product
{
    public string Name { get; set; }
    public decimal Price { get; set; }
}

public class Order
{
    public List&amp;lt;Product&amp;gt; Products { get; set; } = new();

    public decimal TotalPrice =&amp;gt; Products.Sum(p =&amp;gt; p.Price);
    public void AddProduct(Product product)
    {
        Products.Add(product);
    }

    public void RemoveProduct(Product product)
    {
        Products.Remove(product);
    }

    public void ClearProducts()
    {
        Products.Clear();
    }

    public override string ToString()
    {
        return $"Order with {Products.Count} products, Total Price: {TotalPrice:C}";
    }
}

public class Program
{
    public static void Main(string[] args)
    {
        Order order = new();
        order.AddProduct(new Product { Name = "Apple", Price = 1.20m });
        order.AddProduct(new Product { Name = "Banana", Price = 0.80m });
        Console.WriteLine(order.ToString());
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>microsoft</category>
      <category>seniorcsharpdeveloper</category>
    </item>
    <item>
      <title>C# 14 Fav Feature</title>
      <dc:creator>Ramkumar Radhakrishnan</dc:creator>
      <pubDate>Mon, 11 Aug 2025 09:26:47 +0000</pubDate>
      <link>https://dev.to/ramkumar_radhakrishnan/c-14-fav-feature-3m5b</link>
      <guid>https://dev.to/ramkumar_radhakrishnan/c-14-fav-feature-3m5b</guid>
      <description>&lt;p&gt;Recently I had a chance in reading C# 14 new features. You can refer here - &lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-14" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you dont find a time, and you want to pick one update which can save your coding a much extend. Here it is. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Null-conditional assignment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Previously, we had to check the not null before assignment as &lt;/p&gt;

&lt;p&gt;&lt;code&gt;if (customer is not null)&lt;br&gt;
{&lt;br&gt;
    customer.Order = GetCurrentOrder();&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now it can be changed to &lt;/p&gt;

&lt;p&gt;&lt;code&gt;customer?.Order = GetCurrentOrder();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The right side of the = operator is evaluated only when the left side isn't null. If customer is null, the code doesn't call GetCurrentOrder.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>26th June.</title>
      <dc:creator>Ramkumar Radhakrishnan</dc:creator>
      <pubDate>Fri, 27 Jun 2025 21:10:25 +0000</pubDate>
      <link>https://dev.to/ramkumar_radhakrishnan/26th-june-58h2</link>
      <guid>https://dev.to/ramkumar_radhakrishnan/26th-june-58h2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Required Syntax/ keyword.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I came across ‘required’ key word in C#. Not sure which version it was introduced. But now it exists, so just used copilot to enhance my understanding on the same.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Person
{
 public required string Name { get; set; }
 public int Age { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you are a C# developer, u might haven't skipped properties. Now adding required before the variable makes it like you have to set the value explicitly. If it's not a required property, C# takes care of the setting default values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var p = new Person(); // ❌ Error: Name is required
var p = new Person { Name = “Ram” , Age = 36 }; // This is correct.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This applies to fields and properties. This is different from [required] attribute.&lt;/p&gt;

&lt;p&gt;While understanding about this, I had a doubt you can set the properties by adding parameters to the constructors. Let say,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Person
{
 public string Name { get; set; }
 public int Age { get; set; }
}


Person(string name)
{
  Name = name; 
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What difference it could bring? I checked with copilot again. I could understand that,&lt;/p&gt;

&lt;p&gt;Constructors are enforced during the compile time and required are forced only during run time.&lt;/p&gt;

&lt;p&gt;By this type, you can evolve the code, but in case constructors we have to make sure fix during the compile time. Also, the code looks clean and neat in terms the required.&lt;/p&gt;

&lt;p&gt;Refactoring is flexible — If I have to introduce a new parameter in the constructor, I have to makes changes all the way where all the initialization has happened but not the case with required.&lt;/p&gt;

&lt;p&gt;Fields can grow! agreed!&lt;/p&gt;

&lt;p&gt;But usually, developers introduce parameter constructor for the sake the sake of validation even before creation object which in case of ‘required’ is not possible.&lt;/p&gt;

&lt;p&gt;So, in the end I am good at ‘required’ :P&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
