<?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: Lou Creemers</title>
    <description>The latest articles on DEV Community by Lou Creemers (@lovelacecoding).</description>
    <link>https://dev.to/lovelacecoding</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%2F867091%2F6ec67fc9-2dfe-4473-8c8c-b51a1ef0634e.jpg</url>
      <title>DEV Community: Lou Creemers</title>
      <link>https://dev.to/lovelacecoding</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lovelacecoding"/>
    <language>en</language>
    <item>
      <title>Vue Composition API: Computed and Ref Properties Explained</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Thu, 19 Feb 2026 20:44:41 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/vue-composition-api-a-clear-guide-to-ref-and-computed-4aeh</link>
      <guid>https://dev.to/lovelacecoding/vue-composition-api-a-clear-guide-to-ref-and-computed-4aeh</guid>
      <description>&lt;p&gt;Hey lovely readers,&lt;/p&gt;

&lt;p&gt;If you are working with Vue 3 and TypeScript, you have probably seen &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;computed&lt;/code&gt; many times. They appear in tutorials, real projects, and even job interviews. When I first started using Vue 3, I kept wondering why everything had to be wrapped in &lt;code&gt;ref&lt;/code&gt;, and what made &lt;code&gt;computed&lt;/code&gt; different from a normal function.&lt;/p&gt;

&lt;p&gt;I would consider myself more of a backend developer, and I spent a lot of time in 2025 trying to wrap my head around frontend development. So if you are using Vue 3 with TypeScript now, or planning to start learning Vue, this guide will help you clearly understand these two important concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is state?
&lt;/h2&gt;

&lt;p&gt;Before we talk about &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;computed&lt;/code&gt;, we need to understand one important concept: state.&lt;/p&gt;

&lt;p&gt;State is simply data that can change over time and affects what the user sees on the screen. If the data changes and the UI must update because of it, that data is state.&lt;/p&gt;

&lt;p&gt;Examples of state in a frontend application include a counter value, a list of users fetched from an API, whether a modal is open or closed, the content of an input field, or the currently logged in user.&lt;/p&gt;

&lt;h3&gt;
  
  
  State from a backend perspective
&lt;/h3&gt;

&lt;p&gt;If you come from a backend background, you are already familiar with state. You work with database records, request and response objects, session data, and cached values. That is all state too. The difference is where it lives.&lt;/p&gt;

&lt;p&gt;In traditional backend driven applications, the flow usually looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client sends a request&lt;/li&gt;
&lt;li&gt;The server processes data&lt;/li&gt;
&lt;li&gt;The server returns HTML or JSON&lt;/li&gt;
&lt;li&gt;The page reloads with updated data&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this model, most of the state lives on the server.&lt;/p&gt;

&lt;p&gt;In modern frontend frameworks like Vue, state often lives in the browser. There is no full page reload. Instead, a user clicks a button, data changes in memory, and the UI updates automatically. This automatic update is what we call reactivity.&lt;/p&gt;

&lt;p&gt;Vue needs a way to know which data should trigger UI updates. That is exactly what &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;computed&lt;/code&gt; help with.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;computed&lt;/code&gt; in Vue 3?
&lt;/h2&gt;

&lt;p&gt;In Vue 3, reactivity is managed with the Composition API. Two key features are &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;computed&lt;/code&gt;. You can think of &lt;code&gt;ref&lt;/code&gt; as reactive state and &lt;code&gt;computed&lt;/code&gt; as derived state.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;ref&lt;/code&gt; as reactive state
&lt;/h3&gt;

&lt;p&gt;You use &lt;code&gt;ref&lt;/code&gt; to create reactive values such as numbers, strings, and booleans. This should be a value that you want to change when some action happens in the template.&lt;/p&gt;

&lt;p&gt;Here is a simple example in Vue 3 with TypeScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;increment&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is what is happening. &lt;code&gt;ref&amp;lt;number&amp;gt;(0)&lt;/code&gt; tells TypeScript that this ref contains a number. The actual value is accessed using &lt;code&gt;.value&lt;/code&gt;. When &lt;code&gt;count.value&lt;/code&gt; changes, Vue automatically updates the user interface.&lt;/p&gt;

&lt;p&gt;In backend terms, you can think of &lt;code&gt;ref&lt;/code&gt; as a variable stored in memory that Vue is actively watching. When the value changes, Vue reacts and updates the UI.&lt;/p&gt;

&lt;p&gt;In the template, you do not need to use &lt;code&gt;.value&lt;/code&gt; because Vue unwraps it for you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="si"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"increment"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Increment&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We use &lt;code&gt;.value&lt;/code&gt; in the script because &lt;code&gt;ref&lt;/code&gt; does not return the raw number. It returns a reactive wrapper object that allows Vue to track changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;ref&lt;/code&gt; with objects
&lt;/h2&gt;

&lt;p&gt;You can also use &lt;code&gt;ref&lt;/code&gt; with objects, especially when working with TypeScript interfaces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Lou&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To update it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you mainly work with objects, you will also come across the &lt;code&gt;reactive&lt;/code&gt; function, but the core idea stays the same. Vue tracks changes and updates the UI when the state changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Derived state and &lt;code&gt;computed&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;ref&lt;/code&gt; represents your source of truth, then &lt;code&gt;computed&lt;/code&gt; represents values derived from that source.&lt;/p&gt;

&lt;p&gt;Derived state is data that is calculated from other state, should always stay in sync, and should not be manually updated.&lt;/p&gt;

&lt;p&gt;Here is an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;computed&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;computed&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, &lt;code&gt;price&lt;/code&gt; and &lt;code&gt;quantity&lt;/code&gt; are source state. &lt;code&gt;total&lt;/code&gt; is derived state.&lt;/p&gt;

&lt;p&gt;From a backend perspective, this is similar to a calculated column, a DTO field built from other fields, or a value computed from query results. You would not store &lt;code&gt;total&lt;/code&gt; separately in a database if it can always be calculated from &lt;code&gt;price * quantity&lt;/code&gt;, because that would create duplication and possible inconsistencies.&lt;/p&gt;

&lt;p&gt;The same idea applies here. &lt;code&gt;computed&lt;/code&gt; helps you avoid duplicated state and keeps your data consistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;computed&lt;/code&gt; vs a function
&lt;/h2&gt;

&lt;p&gt;You could write a normal function instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And use it in the template like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{{ fullName() }}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So why use &lt;code&gt;computed&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;The main difference is caching and dependency tracking. A normal function runs every time the component re renders. It does not remember its previous result. Even if the underlying values have not changed, the function will still run again.&lt;/p&gt;

&lt;p&gt;A computed property is cached. Vue tracks which reactive values it depends on and only recalculates when one of those values changes. If nothing changes, Vue reuses the previous result.&lt;/p&gt;

&lt;p&gt;In small examples, the difference is not very noticeable. In larger components with complex logic or expensive calculations, &lt;code&gt;computed&lt;/code&gt; makes your code more efficient and easier to reason about.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple rule that helps
&lt;/h2&gt;

&lt;p&gt;When deciding between &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;computed&lt;/code&gt;, ask yourself one question:&lt;/p&gt;

&lt;p&gt;Is this the source of truth, or is it derived from something else?&lt;/p&gt;

&lt;p&gt;If it is the source of truth, use &lt;code&gt;ref&lt;/code&gt;. If it is derived from other state, use &lt;code&gt;computed&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This mental model is especially helpful if you come from a backend background where you already think in terms of data consistency and single sources of truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;computed&lt;/code&gt; with getters and setters
&lt;/h2&gt;

&lt;p&gt;Sometimes you want a computed property that can both read and update data. In that case, you can use a getter and a setter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fullName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;computed&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can assign a value directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Lou Creemers&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is useful in forms where one input field represents multiple pieces of state.&lt;/p&gt;

&lt;h2&gt;
  
  
  TypeScript tips
&lt;/h2&gt;

&lt;p&gt;When using Vue 3 with TypeScript, it is good to think about types early. TypeScript often already recognizes the type automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isVisible&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But you can also define it explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isVisible&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For &lt;code&gt;computed&lt;/code&gt;, the return type is usually recognized automatically. If needed, you can define it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;computed&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Being clear about types helps prevent subtle bugs, especially in larger projects or team environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mistakes
&lt;/h2&gt;

&lt;p&gt;Here are some common mistakes that I've made dozens of times include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forgetting to use &lt;code&gt;.value&lt;/code&gt; inside the script&lt;/li&gt;
&lt;li&gt;Trying to change a computed property without defining a setter &lt;/li&gt;
&lt;li&gt;using &lt;code&gt;computed&lt;/code&gt; for something that should just be a normal constant.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If something is not updating in your template, the first thing to check is whether you are actually working with a reactive source.&lt;/p&gt;

&lt;h2&gt;
  
  
  That is a wrap
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;computed&lt;/code&gt; are central parts of Vue 3’s reactivity model. Once you understand the difference between source state and derived state, your components become much easier to reason about. If you are building applications with Vue 3 and TypeScript, mastering these two concepts will give you a strong foundation for everything that follows.&lt;/p&gt;

&lt;p&gt;If you have any questions or comments, feel free to reach out (&lt;a href="//louella.dev/socials"&gt;louella.dev/socials&lt;/a&gt;) or leave a comment down below.&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>vue</category>
      <category>typescript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Public Speaking at Tech Events 101: Being Uncomfortable Is Worth It</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Tue, 10 Feb 2026 15:06:25 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/public-speaking-at-conferences-101-being-uncomfortable-is-worth-it-43kk</link>
      <guid>https://dev.to/lovelacecoding/public-speaking-at-conferences-101-being-uncomfortable-is-worth-it-43kk</guid>
      <description>&lt;p&gt;Hey lovely readers,&lt;/p&gt;

&lt;p&gt;If you have been following this series from the start, you now know how to get started with speaking, how to apply to conferences, and how to prepare once you get accepted. You might have even stood on stage already, or you might be right at the point where you are thinking about submitting your first abstract. Either way, there is a very big chance you have already felt uncomfortable at some point in this process.&lt;/p&gt;

&lt;p&gt;Your heart rate goes up, your hands feel shaky, and your brain suddenly starts questioning every decision that led you here. Maybe that happens right before you walk on stage, or maybe it happens much earlier, when you are staring at a submit button and wondering if you should really go through with it. This post is about that feeling, not about getting rid of it or pretending it does not exist, but about understanding it and learning why it might actually be a good sign.&lt;/p&gt;

&lt;h2&gt;
  
  
  Even “good speakers” feel weird before a talk
&lt;/h2&gt;

&lt;p&gt;One of the most comforting things I learned after getting more involved in the speaker world is how many experienced speakers still struggle with the same things beginners do. Not just the people doing their first talk, but also the ones you see on big stages at well-known conferences. The difference is not that they do not feel it, but that they no longer see it as a reason to stop.&lt;/p&gt;

&lt;p&gt;A lot of speakers that are 1000 times better than me at speaking openly talk about how they can barely eat breakfast or lunch on the day of their talk. Their stomach is upset, adrenaline takes over, and food just does not sound appealing at all until everything is done. Others mention that they delay working on their slides or demos until the last moment, even though they care deeply about their talk, simply because their brain refuses to fully engage until there is pressure. And almost all of them will admit that they are nervous in the minutes before they walk on stage, even after years of experience.&lt;/p&gt;

&lt;p&gt;What matters is that these are also the same people who say they love public speaking. They keep submitting abstracts, they keep traveling, and they keep going back on stage again and again. Being nervous, procrastinating a bit, or not being able to eat beforehand does not mean you are bad at this. It means your body is reacting to something that matters to you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discomfort is not a warning sign
&lt;/h2&gt;

&lt;p&gt;A lot of us grow up learning that discomfort is something to avoid. If something feels scary, awkward, or stressful, we assume it must be wrong or unsafe, and we look for ways to back out. That reaction makes sense in many situations, but public speaking is usually not one of them.&lt;/p&gt;

&lt;p&gt;Standing on a stage, sharing your ideas, and letting people form opinions about your work is scary by nature. Your nervous system reacts because it thinks you are about to do something important and unpredictable, not because you are in danger. Feeling uncomfortable in that moment does not mean you are unprepared or incapable. More often, it simply means you care about doing a good job.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your body knows before your brain does
&lt;/h2&gt;

&lt;p&gt;That tight feeling in your chest before walking on stage, the restless energy while waiting to be introduced, or the sudden urge to back out even though you practiced and prepared are all very common reactions. Your body is responding before your brain has time to rationalize what is happening. It is not trying to sabotage you, it is trying to keep you alert.&lt;/p&gt;

&lt;p&gt;Your brain, on the other hand, might start listing reasons why you should not be there. Someone else is more experienced, you might forget something, or someone might ask a question you cannot answer. In reality, your body is reacting to the importance of the moment, not to the outcome. Once you start seeing discomfort as a signal instead of a problem, it becomes much easier to move forward while feeling it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five uncomfortable minutes can change years
&lt;/h2&gt;

&lt;p&gt;Most of the truly uncomfortable parts of speaking are surprisingly short. The walk to the stage, the introduction, and the first few minutes where your voice might shake and your thoughts feel scattered are often the hardest part. After that, something usually shifts and you settle into your rhythm. That’s also why you should practice the beginning more often than the rest.&lt;/p&gt;

&lt;p&gt;Those first minutes can feel intense, but they are nothing compared to what can come out of them. Speaking can lead to opportunities like traveling to places you might never have visited otherwise, meeting some very smart and generous people, getting invited to share knowledge you already care about, or being offered jobs and freelance work because someone saw you speak. None of those things happen without those uncomfortable moments at the start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confidence is not a prerequisite
&lt;/h2&gt;

&lt;p&gt;One of the biggest misconceptions about public speaking is that you need to feel confident before you start. In reality, confidence is something that slowly builds because you keep showing up, even when it feels uncomfortable. You do not wait for confidence and then act, you act and let confidence catch up later.&lt;/p&gt;

&lt;p&gt;You are allowed to be nervous, to doubt yourself, and to feel like you do not fully belong yet. You can still submit the abstract, accept the talk, and walk on stage anyway. Every time you do, you show yourself that you can survive the discomfort, and that is where confidence comes from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Loving speaking and being nervous can exist at the same time
&lt;/h2&gt;

&lt;p&gt;This is something I wish more people talked about openly. You can genuinely love public speaking and still feel nervous before every session. You can enjoy being on stage and still struggle to eat beforehand, or procrastinate on slides until the deadline is uncomfortably close.&lt;/p&gt;

&lt;p&gt;These things do not cancel each other out. They are simply different ways your body and brain deal with adrenaline, pressure, and expectations.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small reminder before you click submit
&lt;/h2&gt;

&lt;p&gt;If you are reading this while hovering over a submit button, of a Call for Papers or wondering if you are really ready, it helps to remember that discomfort is not a stop sign. More often, it is a sign that you care about the stuff you put out to people. Feeling uncomfortable does not mean you should wait, it usually means you are growing.&lt;/p&gt;

&lt;p&gt;Five uncomfortable minutes are a very small price to pay for the experiences, connections, and confidence that can follow. You do not need to get rid of the discomfort to move forward. You just need to decide that it is not in charge.&lt;/p&gt;

&lt;h2&gt;
  
  
  That is a wrap
&lt;/h2&gt;

&lt;p&gt;Public speaking will probably always come with some level of discomfort, even after years of experience and many talks. If it matters to you, your body will react, and that is completely normal. Feeling uncomfortable does not mean you are failing, it means you are paying attention.&lt;/p&gt;

&lt;p&gt;Thanks for reading! If you want to share anything or have any questions, feel free to leave a comment or reach out on my socials.&lt;/p&gt;

</description>
      <category>speaking</category>
      <category>programming</category>
      <category>community</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why Blogging Still Matters in the Age of AI</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Sun, 28 Dec 2025 20:07:56 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/why-blogging-still-matters-in-the-age-of-ai-438b</link>
      <guid>https://dev.to/lovelacecoding/why-blogging-still-matters-in-the-age-of-ai-438b</guid>
      <description>&lt;p&gt;Hi lovely readers,&lt;/p&gt;

&lt;p&gt;If you’ve ever thought about starting a blog but stopped because “no one reads blogs anymore,” you’re not alone. With AI changing how people consume content, it’s easy to assume blogging has lost its value. I started blogging in 2021, and since then I’ve published 45 posts, with my most read one reaching 40 thousand views. That experience has shown me that blogging is still incredibly important and worth pursuing today. Here’s why.&lt;/p&gt;

&lt;h2&gt;
  
  
  For yourself
&lt;/h2&gt;

&lt;p&gt;We only save a limited amount of information every day in our heads. In my case, that limit is very noticeable. My brain often feels like a strainer. All my loved ones know that if they want me to remember something, they need to write it down for me. Telling me while I am doing something else guarantees I will forget it within minutes.&lt;/p&gt;

&lt;p&gt;I sometimes get the opportunity to talk to some of the smartest people in the tech field. People who know far more about the subject than I ever will, and that is completely fine. What frustrates me is when someone explains something clearly, and five minutes later I realize I have already forgotten most of it.&lt;/p&gt;

&lt;p&gt;That is where writing things down becomes important. Whether it is a reminder, a to do list, or a personal knowledge base, writing forces you to slow down and think about what you just learned. Instead of just listening and moving on, you actively process the information.&lt;/p&gt;

&lt;p&gt;Writing things down also helps with memory. When you put something into your own words, your brain has to revisit the concept instead of letting it fade away. Writing on paper is generally better for remembering the concept, but writing a blog post is a great alternative. You can even start on paper and later turn it into a digital blog post.&lt;/p&gt;

&lt;p&gt;Over time, your blog becomes a manual for your future self. You will forget things, especially technical details. Having blog posts that you wrote yourself means you always have an explanation that already made sense to you once. Often these posts include examples, demos, or code snippets that you can reuse or quickly understand again.&lt;/p&gt;

&lt;p&gt;Another benefit is language development, especially if English is not your first language. My native language is Dutch, and during university my teachers often pointed out how I would lose my train of thought halfway through a sentence. Writing technical blog posts in a non-native language takes time and effort, but that effort adds up. I now notice awkward sentences much faster and make far fewer grammar mistakes than I did in 2021. That improvement also carries over into my work life, where clear written communication through Slack, Teams, or email is essential in an international environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  For others
&lt;/h2&gt;

&lt;p&gt;If you learn something interesting or feel genuinely excited about a topic, sharing it can help others while trying to understand it or practicing it yourself.&lt;/p&gt;

&lt;p&gt;When I started blogging, I was still in university. By spending a lot of time on Twitter, I slowly realized that going to university is not something everyone has access to. In many countries, studying is extremely expensive. Others choose not to pursue it because of family responsibilities or personal circumstances. Meanwhile, I was 22, living in a country where university cost around 2500 euros a year, and I was learning a lot of genuinely interesting things.&lt;/p&gt;

&lt;p&gt;That realization became a big motivator for me. Besides all the personal benefits blogging gave me, it felt good to share knowledge that I had easy access to. I would go to class, take notes on my laptop or on paper, put everything into Notion, and then turn those notes into a blog post or sometimes a short series of tweets if I felt it could be useful to others.&lt;/p&gt;

&lt;p&gt;I still do this today. I learn from public speakers at conferences, from colleagues, and even from students I teach who are deeply interested in topics I know very little about. Someone mentions a concept or explains something new to me, and I write it down so I can explore it further later.&lt;/p&gt;

&lt;p&gt;Some of those notes stay in Notion forever. Others turn into blog posts. Either way, writing and sharing creates a way to pass knowledge forward. AI is not always reliable for this yet. A concept might be too new for it to know about, it might hallucinate features or solutions, or it might explain something in a way that simply does not click for people. That is where you can make a real difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  For your career
&lt;/h2&gt;

&lt;p&gt;Blogging also plays a role in your career, even if that is not the reason you started in the first place.&lt;/p&gt;

&lt;p&gt;When you write blog posts, you are not just sharing knowledge. You are showing how you think. You show how you break down problems, how you explain concepts, and what you find important enough to spend time on. That is very different from listing skills on a CV or LinkedIn profile.&lt;/p&gt;

&lt;p&gt;A blog gives context to your experience. It shows what you actually do with the tools and technologies you work with. Someone reading your post can see how deep you go, how you approach learning something new, and how you communicate technical ideas.&lt;/p&gt;

&lt;p&gt;Another important part is visibility. Your work normally stays within your team or your company. A blog moves that work into the open. People outside your immediate circle can find it, learn from it, and form an opinion of you long before you ever speak to them.&lt;/p&gt;

&lt;p&gt;This can lead to opportunities you did not actively chase. Conversations start more easily when someone already knows what you’re interested in and what you know. Sometimes people reach out because a post helped them. Sometimes it becomes a reference point during an interview or a collaboration. None of this is guaranteed, but it is something you would not have without blogging.&lt;/p&gt;

&lt;p&gt;For me, blogging never felt like a career strategy. It felt like documenting what I was learning. Over time, it simply became part of how I work and how I grow. And that visibility is something that helps just as much as the knowledge itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your keystrokes are precious
&lt;/h2&gt;

&lt;p&gt;Once you start working in a team and someone asks you to explain something over text, you usually have two options. One is writing a long Teams or Slack message that only one or two people will ever read. The other is writing a blog post so that many people can benefit from the same amount of effort.&lt;/p&gt;

&lt;p&gt;At that point, it is worth asking yourself whether those keystrokes are really worth your time and energy.&lt;/p&gt;

&lt;p&gt;I first learned about this idea in 2024 when Scott Hanselman spoke at a meetup near me. He mentioned his website &lt;a href="http://keysleft.com/" rel="noopener noreferrer"&gt;keysleft.com&lt;/a&gt; and his blog post &lt;a href="https://www.hanselman.com/blog/do-they-deserve-the-gift-of-your-keystrokes" rel="noopener noreferrer"&gt;Do they deserve the gift of your keystrokes&lt;/a&gt;. One quote from that post really stuck with me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you email someone one on one, you are reaching that one person.&lt;/p&gt;

&lt;p&gt;If you blog about it, or update a wiki or something similar, your keystrokes travel farther and reach more people.&lt;/p&gt;

&lt;p&gt;You only have so many hours in the day.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That idea is absolutely true. Why put the same amount of effort into a one to one message when you can help more people with that same effort. Writing a blog post forces you to think more clearly about the concept, allows you to reuse it later, and gives future colleagues or random people on the internet something useful to learn from.&lt;/p&gt;

&lt;p&gt;I do this for students as well. In their first year, my students have to learn PyGame and Python Flask. Instead of explaining the same concepts from scratch every year, I wrote blog posts like &lt;a href="https://dev.to/lovelacecoding/how-to-build-your-first-python-game-a-step-by-step-guide-to-creating-a-simple-shooter-with-pygame-f0k"&gt;&lt;code&gt;How to Build Your First Python Game: A Step-by-Step Guide to Creating a Simple Shooter with PyGame&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://lovelacecoding.hashnode.dev/build-a-to-do-list-app-using-python-flask-jinja2-and-sql" rel="noopener noreferrer"&gt;&lt;code&gt;Build a To-Do List App Using Python Flask, Jinja2, and SQL&lt;/code&gt;&lt;/a&gt;. They also struggled with topics like &lt;a href="https://dev.to/lovelacecoding/secure-your-coding-create-an-ssh-key-on-mac-or-windows-pdd"&gt;SSH keys&lt;/a&gt; and &lt;a href="https://dev.to/lovelacecoding/how-to-create-a-git-tag-with-github-18of"&gt;Git Tags&lt;/a&gt;, so I wrote blog posts on those as well. All of these blog posts are public. I need to explain these concepts every year anyway, so it makes sense to put them online where they can help more than just one group of students.&lt;/p&gt;

&lt;p&gt;The work stays the same. The reach does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  That’s a wrap!
&lt;/h2&gt;

&lt;p&gt;Blogging does not have to be about algorithms, monetization, or chasing numbers. At its core, it is about learning, documenting, and sharing in a way that works for you. It helps you remember what you learn, makes knowledge more accessible for others, and allows your effort to reach further than a single message or conversation ever could.&lt;/p&gt;

&lt;p&gt;You do not need a big audience to start. You do not need a perfect writing style or a niche figured out from day one. What matters is that you write things down, in your own words, and put them somewhere you can come back to later. Everything else grows from there.&lt;/p&gt;

&lt;p&gt;If you have been on the fence about starting a blog, I hope this gave you a different perspective. And if you already have one, maybe this is your sign to keep going.&lt;/p&gt;

&lt;p&gt;If you have thoughts, questions, or experiences you would like to share, feel free to leave a comment under this post or reach out to me on &lt;a href="http://louella.dev/socials" rel="noopener noreferrer"&gt;my socials&lt;/a&gt;. I am always happy to talk about blogging, learning in public, and all things tech.&lt;/p&gt;

</description>
      <category>writing</category>
      <category>community</category>
      <category>learning</category>
    </item>
    <item>
      <title>Public Speaking at Tech Events 101: From Acceptance to the Stage</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Mon, 22 Dec 2025 19:39:00 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/public-speaking-at-tech-events-101-from-acceptance-to-the-stage-487l</link>
      <guid>https://dev.to/lovelacecoding/public-speaking-at-tech-events-101-from-acceptance-to-the-stage-487l</guid>
      <description>&lt;p&gt;Hey lovely readers,&lt;/p&gt;

&lt;p&gt;So you submitted your abstract, refreshed your inbox a little too often, and got the email you were hoping for. You have been accepted. That is exciting, and also a tiny bit terrifying, because now it is real.&lt;/p&gt;

&lt;p&gt;I remember being afraid to click the confirmation button for the first time. It felt like I was signing a contract I might not be ready for. That feeling passed quickly, but I still remember the moment.&lt;/p&gt;

&lt;p&gt;If you are new here, this post is part 2 of a series about getting into public speaking. In &lt;a href="https://dev.to/lovelacecoding/public-speaking-at-tech-events-101-how-to-start-your-speaker-journey-2olj"&gt;part 1&lt;/a&gt;, I talked about how to get started, how to write talk abstracts, how to use Sessionize, and how to apply to meetups and conferences.&lt;/p&gt;

&lt;p&gt;If you already read part 1, welcome back. This is the next step.&lt;/p&gt;

&lt;p&gt;In this part, we will go through what happens after the “yes”: what to check right away, how to plan your prep time, how to build slides and demos in a way that makes you feel comfortable on stage, and what to do on the actual day of the event so you can focus on having fun instead of feeling stressed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of content
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I’ve been accepted, now what?&lt;/li&gt;
&lt;li&gt;Confirm the details&lt;/li&gt;
&lt;li&gt;Plan it out&lt;/li&gt;
&lt;li&gt;Make a rough sketch&lt;/li&gt;
&lt;li&gt;Presentation&lt;/li&gt;
&lt;li&gt;Demo Code&lt;/li&gt;
&lt;li&gt;Prepare, prepare, prepare&lt;/li&gt;
&lt;li&gt;
The fun part: the event

&lt;ul&gt;
&lt;li&gt;Planning your trip&lt;/li&gt;
&lt;li&gt;Just before leaving the house&lt;/li&gt;
&lt;li&gt;The night before your session&lt;/li&gt;
&lt;li&gt;Waking up&lt;/li&gt;
&lt;li&gt;At the event&lt;/li&gt;
&lt;li&gt;Just before your talk&lt;/li&gt;
&lt;li&gt;After your talk&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Other questions answered that I could not put anywhere else

&lt;ul&gt;
&lt;li&gt;Do I need a new talk for every event?&lt;/li&gt;
&lt;li&gt;Do speakers get paid?&lt;/li&gt;
&lt;li&gt;What if my demo fails during the talk?&lt;/li&gt;
&lt;li&gt;How do I deal with nerves or stage fright?&lt;/li&gt;
&lt;li&gt;How do I grow visibility as a speaker?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;That’s a wrap!&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  I’ve been accepted, now what?
&lt;/h2&gt;

&lt;p&gt;Have you been accepted to your very first conference or meetup talk? Congratulations, now the real work begins.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Confirm the details&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When your session is accepted for a conference through Sessionize, you will receive an email with the subject “[Session title] has been accepted” with an email from the organizer and a confirmation button. Once you receive this email, immediately check the event date in your calendar to make sure you are not double booked.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ne1z6tzexz63cphaqrw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ne1z6tzexz63cphaqrw.png" alt="Email notification showing a session acceptance message with the text “Well done, Louëlla. Your session ‘Modern Java and C#: How You Win by Knowing Both’ has been accepted” and a green “Confirm participation” button." width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a moment to read through the email carefully and make sure you understand what is expected from you. Things to double check include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The exact length of your session&lt;/li&gt;
&lt;li&gt;Whether there is time reserved for Q&amp;amp;A&lt;/li&gt;
&lt;li&gt;If the session will be recorded and shared publicly&lt;/li&gt;
&lt;li&gt;How travel and hotel arrangements work, or how reimbursement is handled&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If anything is unclear, reach out to the organizing team and ask. It is completely normal to have questions, especially for your first conference. Most confirmation emails include a contact email address for the organizers, and they are usually happy to clarify things early rather than deal with confusion later.&lt;/p&gt;

&lt;p&gt;If you think you have a clear vision of what they expect of you, feel free to click ‘confirm participation’. This way the organizer knows that you’ve confirmed too.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Plan it out&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Sometimes you will be accepted 8 months before the conference or event takes place. Sometimes it will be only 2 months beforehand. You need to think about when you are going to make time to build your talk, prepare a demo, and practice. Try to do this when your mind has the most energy. If you are a night person, try working on it after regular work hours. If you are a morning person, prepare before your day starts.&lt;/p&gt;

&lt;p&gt;How long it takes to finish your talk is really up to you. Did you promise demos in your abstract? Then you will have to code something. Just a presentation? In theory, that should take less time. It also depends on your time slot. A 20-minute talk takes less time to prepare than a 60-minute talk.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Make a rough sketch&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Begin with a rough sketch. Read your abstract again to see what you promised, and decide what you want to talk about and for how long. AI can help with this part if you need some outlining. You usually start with an intro, then a bit of information about yourself and how you got interested in the topic. Then you add some background information on what people need to know before the talk starts, then the actual talk itself, a demo, and finally a conclusion with resources and your socials.&lt;/p&gt;

&lt;p&gt;What you actually talk about depends on your topic. Keep in mind that you usually talk faster when you are nervous, and if the conference wants you to do Q&amp;amp;A at the end, keep 5 to 10 minutes available for that as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Presentation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Your presentation should not do the talking for you. Use it to explain things and to support your story. Do not put long sentences in your slides. Try to have a maximum of six items on a slide, such as bullet points or images.&lt;/p&gt;

&lt;p&gt;Keep in mind accessibility and visibility. Use images that look good on small screens and large screens. Use code snippets and text with enough contrast and make sure the font size is big enough. If you use videos, be sure they have subtitles. Many conferences put talks online, so be careful with copyright for videos, images, and music.&lt;/p&gt;

&lt;p&gt;Go through your rough sketch and make slides that fit your style or vision. Most likely, you already have an idea of what they should look like. Everyone has their own way of creating presentations, so I will not tell you exactly what yours should look like.&lt;/p&gt;

&lt;p&gt;If you are having a hard time deciding which tool to use, a lot of people use PowerPoint or Google Slides. If you prefer making slides from code, check out &lt;a href="https://sli.dev/" rel="noopener noreferrer"&gt;Slidev&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Demo Code&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You should prepare your demo code well before your talk and have backups ready. If I am live coding, I always have a fully working project as well as video recordings as a backup. I also have a brand-new or halfway-finished project that I can start building on stage. In the past, I had a project that I wanted to create live on stage, until something in my project template suddenly decided to update. Do not let that be you. Be prepared for the unexpected.&lt;/p&gt;

&lt;p&gt;Also have code snippets ready. If you need to type a big chunk of code, you might forget something due to adrenaline or the noise of the room. If you use a JetBrains IDE like I do, you can use &lt;a href="https://www.jetbrains.com/help/idea/using-live-templates.html" rel="noopener noreferrer"&gt;live templates&lt;/a&gt;, where you can add code snippets and use them with just a shortcut name and a press of the Tab key.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Prepare, prepare, prepare&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before you leave your house to go to the event, rehearse your presentation and your code until you feel comfortable. Time it, and see where you need to add or remove slides. Keep in mind that you will talk faster under pressure, and try not to wander off in your story.&lt;/p&gt;

&lt;p&gt;Once you think you are 80 percent done, present it to something or somebody. Preferably a real person. Even if they do not know what you are talking about, ask them to focus on your timing, filler words you repeat a lot, and how often you say “uh.” Knowing they are listening for these things will help you improve.&lt;/p&gt;

&lt;p&gt;If you don’t have anybody near you, then record yourself. Once you’re done giving your talk in front of the camera, you’re going to watch and listen to it separately. For listening, turn your screen around so that you can’t see the video and just listen. See where the ‘uh’ moments and filler words are. For viewing, turn off your sound and just watch what you do with your body posture and with your hands. &lt;/p&gt;

&lt;p&gt;Are you using those hands too little or too much? are you saying ‘uh’ a lot in a certain part of the talk? Are you sloughed over? Notice what you would like to do better, focus on that when you record yourself again and only rehearse the bits you were unhappy with, especially when it’s a longer (45 minutes or more) talk.&lt;/p&gt;

&lt;p&gt;If you feel fully comfortable with your talk, you can decide to only rehearse the first few minutes of your talk. Starting is always the hardest part. Once you get past that first hurdle, your brain will take over if you have practiced the full talk a few times.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fun part: the event
&lt;/h2&gt;

&lt;p&gt;What are you going to do just before you arrive at the event? What are you going to do while you are there? Here are the ins and outs.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Planning your trip&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Normally, when you are accepted to a conference that pays for your travel, there are two possible ways they will handle it. They might have a travel agent who will contact you and book your plane ticket, or you might book the ticket yourself and they will reimburse you after the conference. In most cases, the ticket will be an economy seat without checked luggage, so do not pack too heavy.&lt;/p&gt;

&lt;p&gt;Also keep in mind that the evening before the conference, there is usually a “speaker dinner.” This is a dinner with all the speakers, where you can network and enjoy some local food near the hotel where the rooms were booked. It is great fun, so I recommend booking a flight that arrives at least a couple of hours before dinner time.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Just before leaving the house&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Make sure you have your laptop with your slides and code on it. Also have a backup on the cloud or on GitHub, just in case. If you have a laptop without an HDMI port, bring an USB-C to HDMI adapter. If you need internet for your session, consider bringing an USB-C to ethernet adapter as well. Finally, take your laptop charger and a presentation clicker if you have one.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The night before your session&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;During dinner and the night after, try to stay away from too much alcohol. Speakers really love to drink after or before conference days. However, having a hangover during your talk, especially with bright lights on stage, is not fun. Eat enough so that you sleep well, and do not stay up too late if your talk is early.&lt;/p&gt;

&lt;p&gt;Rest before your talk is very important for your memory, patience, and focus the next day. Try to get the amount of sleep you normally need.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Waking up&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Do your usual morning routine and eat breakfast like you normally do. After that, rehearse your talk a couple of times, either completely or partially, just before leaving for the venue.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;At the event&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you are speaking at a meetup, try to be there early and stay for a while if there are other speakers that day. People at meetups really appreciate it if you stay a bit longer for drinks, to have a conversation about your talk or to ask additional questions.&lt;/p&gt;

&lt;p&gt;If it is a multi-day event, it is important to spend some time at the venue before and after your talk. Organizers put in a lot of effort to make the event comfortable for you, often with a speaker room where only speakers are allowed to relax, work, or chat without the busy conference noise. Walk around and talk to attendees, other speakers and sponsors. You can learn a lot from people who are interested in the same topics and it is a great way to connect.&lt;/p&gt;

&lt;p&gt;Also, if it feels like it would help your nerves, go check out the room you’ll be speaking in.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Just before your talk&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is usually the moment where my nerves peak. Everything is ready, there is nothing left to change, and my brain suddenly wants to change everything anyway. But trust me, you’ll be fine.&lt;/p&gt;

&lt;p&gt;Open your laptop and check your slides one more time. Close all software that you do not need. Double-check that Slack, Teams, Discord, or anything similar is not open, and keep your slides ready.&lt;/p&gt;

&lt;p&gt;If you are showing code in an IDE, switch your IDE theme to light mode because it is easier to see on screens. Increase the font size for the IDE and the terminal. JetBrains IDEs have a &lt;a href="https://www.jetbrains.com/guide/java/tutorials/presenting/presentation-mode/" rel="noopener noreferrer"&gt;presentation mode&lt;/a&gt; built in that works very well once you learn how to use it.&lt;/p&gt;

&lt;p&gt;If you’re at a bigger event, also be prepared to get a microphone attached to a headband from somebody. You will need space in one of your pockets for the sender.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;After your talk&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You just gave your (first) talk. Congratulations! Do you want to do more? If so, write down what went well and what did not. That way, you can improve your presentation or demo if you give it again at another event.&lt;/p&gt;

&lt;p&gt;Some events collect feedback from attendees. Some give you that feedback automatically. Others give it to you only if you ask. I still find negative, unhelpful feedback difficult to deal with, so I do not request feedback forms. But positive feedback and constructive criticism can be incredibly helpful, so if you want those forms, ask someone on the event team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other questions answered that I could not put anywhere else
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Do I need a new talk for every event?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;No. Most speakers reuse talks many times, especially in the beginning. Every event has a different audience, so the same session can be given at multiple meetups and conferences. Most speakers refine a talk over time instead of constantly creating new ones.&lt;/p&gt;

&lt;p&gt;As you give the same talk more often, you will naturally start improving it. Feedback from attendees, questions that come up during Q&amp;amp;A, or moments where you notice people lose interest can help you adjust the flow, examples, or depth of the content. You might simplify the talk for beginner-friendly meetups, go deeper into technical details for conferences, or swap demos depending on the audience. Over time, you will also notice when a talk no longer excites you or feels outdated, which is usually a good sign that it is time to retire it or turn it into something new.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Do speakers get paid?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;It depends. Meetups usually do not pay. Many conferences will cover travel and hotel, but not a speaking fee, especially when you are starting out. Paid speaking gigs are more common once you are known in the community or when companies invite you directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What if my demo fails during the talk?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;It happens to everyone. Have backups: a working version, screenshots, or a pre-recorded demo. If something fails, stay calm, explain what would have happened, and move on. Attendees did not come to your session to laugh at you when you ‘fail’. The majority are forgiving and helpful. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How do I deal with nerves or stage fright?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Practice helps a lot, especially the first bit. Also try breathing slowly, drinking water, or having a short script for your opening line. Remember that the audience wants you to succeed. If you forget something, nobody knows your script but you.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How do I grow visibility as a speaker?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Share your slides and demos, write blogs about your talk, post recordings if available, tag the organizers on social media, and keep your Sessionize profile up to date. Being active in online and offline communities helps people remember you.&lt;/p&gt;

&lt;h2&gt;
  
  
  That’s a wrap!
&lt;/h2&gt;

&lt;p&gt;Getting accepted is a big step, but it is only the beginning of the journey. Preparing your talk, dealing with nerves, and standing on stage are all part of learning how public speaking really works. Every single talk will teach you something new, about your content, your timing, and yourself.&lt;/p&gt;

&lt;p&gt;Do not aim for perfection. Aim for feeling prepared and confident enough to enjoy the moment. Your slides do not have to be perfect, your demo does not have to be flawless, and you do not need to sound like a professional keynote speaker. What matters is that you show up, share your knowledge, and do your best.&lt;/p&gt;

&lt;p&gt;If this is your very first accepted talk, take a moment to be proud of yourself. Enjoy the experience, talk to people, and learn from other speakers. If you have done this before, you already know that every event feels different, and that is part of what makes speaking interesting and fun.&lt;/p&gt;

&lt;p&gt;Public speaking is something you grow into over time. With every talk, it gets a little easier, a little more comfortable, and a lot more rewarding.&lt;/p&gt;

&lt;p&gt;If you have questions, experiences to share, or things you are unsure about, feel free to leave a comment under this post. You can also find me on &lt;a href="https://louella.dev/socials" rel="noopener noreferrer"&gt;my socials&lt;/a&gt; if you would rather reach out there.&lt;/p&gt;

</description>
      <category>speaking</category>
      <category>programming</category>
      <category>beginners</category>
      <category>community</category>
    </item>
    <item>
      <title>Modern C# Development: Custom Exceptions Made Simple</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Sat, 20 Dec 2025 21:00:13 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/modern-c-development-custom-exceptions-made-simple-1ln8</link>
      <guid>https://dev.to/lovelacecoding/modern-c-development-custom-exceptions-made-simple-1ln8</guid>
      <description>&lt;p&gt;Hi lovely readers,&lt;/p&gt;

&lt;p&gt;Errors happen. Sometimes they are simple, and sometimes they are very specific to your domain. C# gives us many built in exceptions, but they do not always tell the full story. That is where custom exceptions come in.&lt;/p&gt;

&lt;p&gt;In this post, we are going to look at how to create your own custom exceptions in C#. We will keep it simple, practical, and easy to use in real projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why custom exceptions exist
&lt;/h2&gt;

&lt;p&gt;Imagine you are building an ordering system. A user tries to place an order, but the business rules say no. You could throw something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;InvalidOperationException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"User cannot place this order"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works, but it does not say much. Later on, when you read logs or handle errors, you have to rely on the message string.&lt;/p&gt;

&lt;p&gt;Now compare it to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;OrderNotAllowedException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells a clear story. Something specific went wrong, and it belongs to your domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a basic custom exception
&lt;/h2&gt;

&lt;p&gt;A custom exception is just a class that inherits from &lt;code&gt;Exception&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here is the smallest useful version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderNotAllowedException&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;OrderNotAllowedException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;base&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is all you need to get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding useful information
&lt;/h2&gt;

&lt;p&gt;The real power of custom exceptions comes from adding context. Instead of putting everything into the message, you can add properties.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderNotAllowedException&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;Guid&lt;/span&gt; &lt;span class="n"&gt;UserId&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;OrderNotAllowedException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Guid&lt;/span&gt; &lt;span class="n"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;base&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;$"User &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt; is not allowed to place an order"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;UserId&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your logs and error handlers can access &lt;code&gt;UserId&lt;/code&gt; directly. No string parsing needed. &lt;/p&gt;

&lt;h2&gt;
  
  
  Do you need serialization constructors
&lt;/h2&gt;

&lt;p&gt;In older .NET versions (.NET Framework 4.x and earlier), you often saw extra constructors for serialization. If you are using a modern version of .NET, a simple exception class like the ones above is enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to create custom exceptions
&lt;/h2&gt;

&lt;p&gt;Custom exceptions are useful, but they are easy to overuse.&lt;/p&gt;

&lt;p&gt;Try to avoid these situations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using exceptions for normal control flow&lt;/li&gt;
&lt;li&gt;Creating very generic custom exceptions that add no value&lt;/li&gt;
&lt;li&gt;Exposing internal exception details from public APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a built in exception already describes the problem well, use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick checklist
&lt;/h2&gt;

&lt;p&gt;Before creating a custom exception, ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does this represent a real exceptional case&lt;/li&gt;
&lt;li&gt;Does it add meaning beyond a message string&lt;/li&gt;
&lt;li&gt;Does the name clearly describe the problem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the answer is yes, a custom exception is a good fit.&lt;/p&gt;

&lt;h2&gt;
  
  
  That is a wrap
&lt;/h2&gt;

&lt;p&gt;Custom exceptions are a small feature, but they can make your code much clearer and easier to maintain. Used well, they tell a story about what went wrong and why.&lt;/p&gt;

&lt;p&gt;I hope this post gave you a quick introduction to creating your own exceptions in C#. If you have thoughts or questions, feel free to leave a comment or find me on &lt;a href="https://louella.dev/socials" rel="noopener noreferrer"&gt;my socials&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Public Speaking at Tech Events 101: How to Start Your Speaker Journey</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Mon, 15 Dec 2025 16:51:58 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/public-speaking-at-tech-events-101-how-to-start-your-speaker-journey-2olj</link>
      <guid>https://dev.to/lovelacecoding/public-speaking-at-tech-events-101-how-to-start-your-speaker-journey-2olj</guid>
      <description>&lt;p&gt;Hey lovely readers,&lt;/p&gt;

&lt;p&gt;If you don’t know me, I’m Lou, and I’ve been public speaking for over 3 years now internationally, giving about 10 speaker sessions a year. But if you're just starting, you might be wondering: how do you get to speak on big stages? Do you need a completely new talk every time? And what about getting paid?&lt;/p&gt;

&lt;p&gt;Some speakers have a big following on Twitter (X) or YouTube, or they work for companies like Microsoft or Apple, so getting a spot at big conferences is easier for them. For the rest of us, it takes a bit more effort, and a lot more applications. &lt;/p&gt;

&lt;p&gt;Let's dive in and figure it out together. I'll break down how I got started, answer your questions, and share all the practical tips and advice of things I’ve learned over the years.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of content
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How to get started&lt;/li&gt;
&lt;li&gt;
Creating your first session

&lt;ul&gt;
&lt;li&gt;Brainstorm&lt;/li&gt;
&lt;li&gt;Talk abstract&lt;/li&gt;
&lt;li&gt;Talk title&lt;/li&gt;
&lt;li&gt;Speaker bio&lt;/li&gt;
&lt;li&gt;Picture&lt;/li&gt;
&lt;li&gt;Getting inspired&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Getting on Sessionize

&lt;ul&gt;
&lt;li&gt;Sessions&lt;/li&gt;
&lt;li&gt;Public Profile&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Finding Conferences

&lt;ul&gt;
&lt;li&gt;What to keep in mind&lt;/li&gt;
&lt;li&gt;Finding conferences&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to get started
&lt;/h2&gt;

&lt;p&gt;I got started with speaking just after COVID because I was super active on Twitter, and got invited to talk at WeAreDevelopers Congress that has about 15,000 attendees every year. It was an awesome experience, but I’d never suggest doing your first tech talk in a country where you don’t speak the native language, especially in a packed room of 500 people.&lt;/p&gt;

&lt;p&gt;Instead, start small. Practice in a more relaxed setting, like local meetups. Unless you live in the middle of nowhere, there’s probably a group near you. Attend a few events, watch how speakers handle their flow, gestures, and tone.&lt;/p&gt;

&lt;p&gt;Maybe even more important, get to know the organizers. Ask them what inspired them to start the group, and when/if you feel comfortable, mention that you’d love to speak too. Since many meetups host events 6 to 12 times a year, chances are they’ll welcome you with open arms. Don’t stress too much about having the perfect session; everyone starts somewhere. Even if your first talk isn’t flawless, most people won’t remember the rough spots for long. &lt;/p&gt;

&lt;p&gt;To find local meetups, head over to &lt;a href="http://meetup.com/" rel="noopener noreferrer"&gt;meetup.com&lt;/a&gt;, look up the biggest city near you as the location, and filter by category “Technology” with event type set to “In person.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3dxf8zppfqi1copr5fnk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3dxf8zppfqi1copr5fnk.png" alt="Meetup search results for technology events near Amsterdam, Netherlands, with filters set to in person events and the Technology category, showing how to find local tech meetups by city and event type" width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating your first session
&lt;/h2&gt;

&lt;p&gt;Did the meetup organizers say yes to you speaking at their event, or did you find another event for your debut talk? That’s awesome!&lt;/p&gt;

&lt;p&gt;Most events will need three things from you: a talk abstract, a speaker bio, and a picture of you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Brainstorm
&lt;/h3&gt;

&lt;p&gt;Of course, the first thing that you’ll do is brainstorm what you actually want to talk about. What is your favorite tech stack? Are there any new features in your favorite coding language that you want to learn more about? Did you learn something really interesting while working on an open source project? Is there something that developers do that you think could be done better?&lt;/p&gt;

&lt;p&gt;Think about these kinds of things and make a short list for yourself. Don’t worry if the topic sounds ‘too beginner’ to you. In my experience, the ‘introductory’ level sessions are the ones that fill up rooms the quickest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Talk abstract
&lt;/h3&gt;

&lt;p&gt;Now that you have some ideas in mind, you’re going to write an abstract for a couple of them. Talk abstracts explain what you'll cover during your session. It lets attendees know what they'll learn and helps organizers decide which sessions to include in their schedule if they have multiple sessions to choose from.&lt;/p&gt;

&lt;p&gt;Everyone has their own style for writing abstracts. Here’s my approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First paragraph:&lt;/strong&gt; Grab attention with a question or a bold statement (e.g., “Does X annoy you?”, “Imagine a world where Y is possible,” or “Have you ever wondered about W?”).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Second paragraph:&lt;/strong&gt; Give a brief introduction to the tech or topic you’re discussing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third paragraph:&lt;/strong&gt; Explain what the audience will learn and how, maybe through live coding demos or interactive examples.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Final paragraph:&lt;/strong&gt; End with a call to action (e.g., “Join me if you want to solve X once and for all” or “Attend this session to dive deep into Y”).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s an example abstract that I’ve written about rubber duck debugging:&lt;/p&gt;

&lt;p&gt;“&lt;em&gt;Do you ever get stuck on a bug and wonder if a simple chat could solve it? Imagine if your trusty rubber duck could help you solve those coding challenges.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this session, we’re diving into rubber duck debugging, a silly, yet super effective way to troubleshoot your code. I’ll share how talking through your problems with a rubber duck can reveal hidden issues and helps you find fresh insights.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You’ll see live demos where I break down the debugging process, show real-world examples, and explain how this simple method can save you time and frustration. Join me, grab a rubber duck, and let’s turn this fun technique into your solution for cleaner, more efficient code.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The most important thing to note here is &lt;strong&gt;not to let AI generate full talk abstracts&lt;/strong&gt; for you. If you’re sending this in for a conference, these people will notice that it’s AI-generated within seconds and decline your session. Use AI for inspiration for the structure of your talk abstract, let it help you with grammatical errors, but do not let it take over the abstract completely.&lt;/p&gt;

&lt;h3&gt;
  
  
  Talk title
&lt;/h3&gt;

&lt;p&gt;Now that you have your abstract, you need to come up with an attention-grabbing title. I normally always format it like this [Core idea] : [Short phrase to explain the session]. A couple of examples of of talk titles I use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modern C# : A Dive into the Community's Most Loved New Features.&lt;/li&gt;
&lt;li&gt;Azure functions: From Zero to Hero.&lt;/li&gt;
&lt;li&gt;Minimal APIs vs Controller-Based APIs: Finding the Best Fit for Your .NET Projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If I had to come up with a talk about rubber duck debugging. It would probably be something like “&lt;em&gt;Let’s go rubber ducking: How a little duck can help you solve coding challenges”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I often let AI come up with a list of ideas and then mix and match until I find something that I’m happy with. Also, notice that every single one of them is in title case? That makes it look more professional. Some websites can help you with transforming text into title case, like &lt;a href="https://titlecaseconverter.com/" rel="noopener noreferrer"&gt;this title case converter website&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Speaker bio
&lt;/h3&gt;

&lt;p&gt;The speaker bio is just the introduction to who you are, so that the attendees have an idea of who they’re listening to and what your experience level is like.&lt;/p&gt;

&lt;p&gt;Speaker bios must be short, to the point, informative, and written in third person.&lt;/p&gt;

&lt;p&gt;Here’s an example of a format that I would recommend:&lt;br&gt;
&lt;em&gt;”[First name] [Last name] is a [career title], with a passion for [whatever tech you’re interested in]. While working in tech, they really enjoyed working on [whatever project you’re proud of].&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Apart from being a [career title], they love to share knowledge about [topics you want to talk about].”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Of course, feel free to add hobbies that might be interesting, events you might organize or are part of, volunteer work, awards you have, information about content creation, etc. Most importantly, keep it short and to the point.&lt;/p&gt;

&lt;h3&gt;
  
  
  Picture
&lt;/h3&gt;

&lt;p&gt;For speaker pictures, the same rules count as pictures on LinkedIn. It should be a professional-looking picture, no obvious selfies, no group picture cutout. And your face should be clearly visible, also as a small profile picture format on a phone, for example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting inspired
&lt;/h3&gt;

&lt;p&gt;Do you need more inspiration for your speaker bio or talk abstracts? Take a look at my GitHub repository: &lt;a href="https://github.com/lovelacecoding/awesome-sessionize-profiles" rel="noopener noreferrer"&gt;https://github.com/lovelacecoding/awesome-sessionize-profiles&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Getting on Sessionize
&lt;/h2&gt;

&lt;p&gt;If you want to get into conferences or bigger meetups, you will need a Sessionize account. Sessionize is the biggest platform for public speakers. You can put all your talk abstracts on here and your speaker bio, and easily apply those to multiple conferences.&lt;/p&gt;

&lt;p&gt;If you go to Sessionize.com, you will be greeted by this homepage:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82pv6wu3gvi2zict6qxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82pv6wu3gvi2zict6qxj.png" alt="Sessionize homepage showing a headline about call for papers, scheduling, and speaker management, with navigation links, login and free trial buttons, and an illustration next to calls to start an event or try a demo, introducing the platform for managing speaker profiles and conference submissions." width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a speaker, you can click on ‘Try For Free’ and choose a way to start your account. I would advise using ‘Classic login’ in case you want to get rid of your social media accounts at some point. Most importantly, pick an email address that you check quite often.&lt;/p&gt;

&lt;p&gt;Once you’ve done that, Sessionize will ask you for a picture and a speaker bio. You already made those if you followed this blog post, so add them in there. &lt;/p&gt;

&lt;p&gt;Once you have everything filled out on your account, your overview will look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3v5ggtmemn22vljviceq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3v5ggtmemn22vljviceq.png" alt="Sessionize speaker profile overview showing a completed account with a profile photo, speaker name and bio, upcoming sessions section, and a map highlighting speaking locations, illustrating what a finished speaker profile looks like after adding details." width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Sessions
&lt;/h3&gt;

&lt;p&gt;On the sidebar, there’s a ‘Sessions’ tab. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fraul4x3688bw6yl0jxp3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fraul4x3688bw6yl0jxp3.png" alt="Sessionize dashboard sidebar with the Sessions tab highlighted by an arrow, showing where to find the sessions section in the navigation menu." width="385" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the session tab, you can add a session by clicking the “Add Session” button. You can also edit, archive, or delete sessions on there once you’ve added some sessions later on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxds07fkkri159wswljmm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxds07fkkri159wswljmm.png" alt="Sessionize Sessions page showing the Active Sessions section, with an arrow pointing to the Add Session button to highlight where a new talk can be created and existing sessions managed." width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on “Add Session” and add those sessions you’ve written abstracts for earlier.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehgthuaidnw0dxwifdnc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehgthuaidnw0dxwifdnc.png" alt="Sessionize add session form showing fields for session title, description, and additional details, where speakers enter the abstract information for a new talk." width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once added, you will see it appear under ‘Active Sessions’ and later it will also show you at which conferences you submitted it for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F745vxmoo6bxutzsfho48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F745vxmoo6bxutzsfho48.png" alt="Sessionize Active Sessions list showing multiple talks with their titles, language, profile visibility, and the conferences they have been submitted to, illustrating how added sessions appear and track submissions." width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Public Profile
&lt;/h3&gt;

&lt;p&gt;If you click on ‘Your Public Profile’ in the sidebar, it will take you to your public profile page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbk30zo47zxjgh7ybacvr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbk30zo47zxjgh7ybacvr.png" alt="Sessionize sidebar navigation showing the My Public Profile option, which links to your speaker public profile page." width="328" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This page is what other people see if they visit your Sessionize account through an abstract submission or through a search engine like Google. &lt;/p&gt;

&lt;p&gt;Your sessions, where you selected 'Show in my public profile' in the Session tab while adding it, show up here, as well as your speaker bio, and your profile picture. You can add a banner and socials in here as well.&lt;/p&gt;

&lt;p&gt;This is my public account. Keep in mind that you will not get the ‘Most Active Speaker’ badge and/or the Microsoft MVP badge. Those are both because I’ve been public speaking a lot. You will not have any badges starting out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7jdh9gyn9kb5qx586kg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7jdh9gyn9kb5qx586kg.png" alt="Example of the author’s Sessionize public speaker profile showing Louëlla Creemers with a profile photo, bio, location, social links, speaking map, and badges, used to demonstrate what a completed public profile looks like." width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding Conferences
&lt;/h2&gt;

&lt;p&gt;So you’ve given a couple of sessions at meetups now, and now you want to try bigger stages or get out there internationally. There are a lot of conferences every year for every possible tech stack. Some are huge (up to 20k attendees), while some are smaller (200 attendees). Some are close by (car distance) and some are far away (12 hours by plane). Some are online, while others are offline. In this chapter, I’ll  help you find conferences, apply, and hopefully get approved.&lt;/p&gt;

&lt;h3&gt;
  
  
  What to keep in mind
&lt;/h3&gt;

&lt;p&gt;There are a lot of conferences for lots of different developers, to filter out some of these conferences there are some things you have to decide for yourself: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most conferences will pay for you to fly over and stay in a hotel near the conference if you’re speaking at their event, but not all of them do. &lt;strong&gt;Are you willing and able to pay for your own stay and/or travel?&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;There are conferences around the world, &lt;strong&gt;so how far away are you willing or able to travel?&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;There are online and offline conferences. &lt;strong&gt;Do you feel comfortable giving a talk in front of just a webcam, or do you only want to do an offline audience?&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;There’s always a timeslot. When starting, it’s important to decide if you feel comfortable giving longer sessions. &lt;strong&gt;Are you okay with 60-minute talks, or do you only feel comfortable with 15-20 minutes&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more flexible you are, the more places you can apply to. However, keep in mind what you’re comfortable with and what your boundaries are. I only did talks up to 30 minutes for well over a year, just because 60 minutes sounded intimidating to me. Personally, I also would never talk at a conference that makes its attendees pay for a ticket but is not willing to pay for at least my hotel. But those are my boundaries; you should decide what works for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding conferences
&lt;/h3&gt;

&lt;p&gt;Once you've made those decisions for yourself. The first way to find conferences is through Sessionize itself. If you look at the sidebar, you will see a ‘Discover events’ tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful7t0clf387r6forlj59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful7t0clf387r6forlj59.png" alt="Sessionize sidebar navigation showing the Discover events tab, which is used to browse and find conferences directly on the platform." width="345" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In here, you can find conferences or meetups that fit your interests that are open to receiving applications. If you click on one of the conferences, you can find info like their location, the date, what kind of sessions they are looking for, and if they pay for travel and / or the stay.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk0xs0hx5didvozrnidnx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk0xs0hx5didvozrnidnx.png" alt="Conference call for papers page showing session guidelines, suggested topics, and speaker information, including details about session length and whether travel, accommodation, and event fees are covered." width="675" height="1171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not every conference has a submission page on Sessionize. If you want to see what else is out there, I recommend taking a look at the following websites:&lt;br&gt;
&lt;a href="https://cfp.watch/" rel="noopener noreferrer"&gt;https://cfp.watch/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://nexttechevent.com/" rel="noopener noreferrer"&gt;https://nexttechevent.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauhnmba6l6pq6zammnuo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauhnmba6l6pq6zammnuo.png" alt="CFP Watch conference listing showing an event in Madrid, Spain, with dates, call for papers deadline, website links, social media links, and icons indicating whether travel and accommodation expenses are covered." width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decide what you want to talk about&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every conference has different tracks and different kinds of developers attending. You need to keep this in mind before you apply. Of course, you’ve already decided what kind of timeslots you feel comfortable with, and what kind of financial compensation you expect, so that’s the first thing you look at. If that's all what you expect it to be, you select the session abstract that you want to submit with. &lt;/p&gt;

&lt;p&gt;You can apply with the abstracts you just added to your sessions page by selecting 'session from your speaker profile' and then selecting the abstract you want to apply with in the dropdown.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fis8ulyh61ptckjjqh3ub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fis8ulyh61ptckjjqh3ub.png" alt="Conference submission form showing the option to apply with a session from your speaker profile, including a dropdown to select an existing abstract instead of creating a new session." width="800" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Put some time and effort into putting it on the correct track, and make sure it fits the conference. Don’t submit .NET talks for a Java conference. Don’t try to submit with Python talks if it’s an Azure conference unless it’s Python with a bit of Azure. Altering an existing abstract to fit a conference more (I changed a talk from React to VueJS before for a VueJS conference) is totally fine.&lt;/p&gt;

&lt;p&gt;Keep in mind not to spam conferences with session abstracts unless they explicitly say otherwise. I have had conversations with conference organizers who mentioned that some people apply with 10 or more abstracts. In those cases, they are often automatically rejected because it comes across as spamming. Giving program committees options is great, but three to four abstracts is usually the sweet spot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some other tips&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are some other things I’ve learned over the years that can help with applying. The first thing is to look at the schedule of the event last year, look at what kind of talks were selected a lot, and let that decide what abstract you’re going to apply with.  You can pick an abstract similar to what was very popular last year, or pick something that you haven’t seen at all yet in their schedule.&lt;/p&gt;

&lt;p&gt;Another tip is to always leave a supportive note or extra comments for the conference organizers to look at if that option is available. Very often when you apply, there’s an ‘additional notes’ section at the very bottom that only organizers can see.&lt;/p&gt;

&lt;p&gt;Tell them, ‘best of luck with selecting the best sessions’ for some extra support. Tell them that you've been to this conference before as an attendee if that's the case. Add a link with recordings, demos, blogs, or slides for them to look at what you’ve done before. Program committees do hard work, checking and rating a lot of abstracts, so a nice comment or extra information for them to make good informed decisions, is really appreciated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06s11x8ep4jvr9oxtqi4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06s11x8ep4jvr9oxtqi4.png" alt="Conference submission form showing an Additional notes field with a short message to the program committee, where speakers can add a supportive note and include links to previous work such as recordings or blog posts." width="800" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dealing with rejection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some conferences will never tell you whether you were accepted or rejected, and you will figure it out through their speaker page on their website. Others will reject you multiple times in a row. Getting into the speaker world is not easy, especially when you start applying internationally. That is why starting with local meetups is such a good first step.&lt;/p&gt;

&lt;p&gt;Even if you've done meetups, getting accepted to conferences is, and always will be, difficult. Most of the time you will be rejected, sometimes close to every submission you send out, and that is normal. It is something every speaker has to get used to.&lt;/p&gt;

&lt;p&gt;There are many reasons for rejection that have nothing to do with you. A conference might already have too many talks on the same topic, your session might not fit the focus of that specific edition, or it might simply come down to limited slots and tough choices.&lt;/p&gt;

&lt;p&gt;It is not personal. Keep applying, keep refining your abstracts, and keep going.&lt;/p&gt;

&lt;h2&gt;
  
  
  That’s a wrap!
&lt;/h2&gt;

&lt;p&gt;Now you know how to write abstracts, how to find conferences, how to apply to conferences, and how to deal with rejections.&lt;/p&gt;

&lt;p&gt;In part 2, I will talk about what happens after you get accepted. We will look at preparing your talk and demos, dealing with nerves, and what the actual day of the event looks like.&lt;/p&gt;

&lt;p&gt;If you have questions, experiences to share, or things you are unsure about, feel free to leave a comment under this post. You can also find me on &lt;a href="https://louella.dev/socials" rel="noopener noreferrer"&gt;my socials&lt;/a&gt; if you would rather reach out there.&lt;/p&gt;

</description>
      <category>speaking</category>
      <category>programming</category>
      <category>beginners</category>
      <category>community</category>
    </item>
    <item>
      <title>Modern C# Development: User Defined Increment and decrement</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Sat, 22 Nov 2025 21:37:51 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/new-user-defined-increment-and-decrement-in-c-14-26cl</link>
      <guid>https://dev.to/lovelacecoding/new-user-defined-increment-and-decrement-in-c-14-26cl</guid>
      <description>&lt;p&gt;Hi lovely readers,&lt;/p&gt;

&lt;p&gt;C# 14 just arrived with .NET 10, and it brings a fun little feature that makes custom types feel even more like built in ones. You can now decide what happens when someone writes &lt;code&gt;myValue++&lt;/code&gt; or &lt;code&gt;myValue--&lt;/code&gt; on your type.&lt;/p&gt;

&lt;p&gt;This was possible before, but only with static methods that returned a new instance. C# 14 adds a new way to do it. You can now write instance operators that update the object directly. It is simple, it is clean, and it can help performance too.&lt;/p&gt;

&lt;p&gt;In this post, we are going to take a friendly look at this feature and how you can try it out. Keep in mind that you need to have .NET 1- installed in order to test this out.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this feature gives you
&lt;/h2&gt;

&lt;p&gt;If you have ever created a numeric style type, you probably have used &lt;code&gt;++&lt;/code&gt; to increment the number by one, or &lt;code&gt;--&lt;/code&gt; to decrement the number by one. Now you get to decide what these postfixes do, creating more freedom.&lt;/p&gt;

&lt;p&gt;C# 14 still supports the classic static operator, but it also lets you write an instance version to change it for specific classes or structs like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="k"&gt;operator&lt;/span&gt; &lt;span class="p"&gt;++()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Update this&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the same idea works for &lt;code&gt;--&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple example
&lt;/h2&gt;

&lt;p&gt;Imagine you have a small type that keeps track of a score. Maybe every time the score grows, it should go up by 2 instead of 1.&lt;/p&gt;

&lt;p&gt;Here is how you can do that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;Score&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="k"&gt;operator&lt;/span&gt; &lt;span class="p"&gt;++()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;+=&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="k"&gt;operator&lt;/span&gt; &lt;span class="p"&gt;--()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;-=&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;++;&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nice and smooth.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about &lt;code&gt;score++&lt;/code&gt; inside expressions
&lt;/h3&gt;

&lt;p&gt;When you write &lt;code&gt;score++&lt;/code&gt; alone, the instance operator works fine. But if you write something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;old&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;++;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the compiler needs both the old value and the new one. For that, you also need the classic static operator.&lt;/p&gt;

&lt;p&gt;Here is the complete version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;Score&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="k"&gt;operator&lt;/span&gt; &lt;span class="p"&gt;++()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;+=&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;Score&lt;/span&gt; &lt;span class="k"&gt;operator&lt;/span&gt; &lt;span class="p"&gt;++(&lt;/span&gt;&lt;span class="n"&gt;Score&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With both operators in place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;old&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;++;&lt;/span&gt;

&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;old&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// 10&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prefix uses the instance operator. Postfix inside an expression uses the static one. The type now behaves just like built in ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is nice
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Better performance&lt;/strong&gt;&lt;br&gt;
The instance operator updates the value directly, so structs avoid extra copies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaner code&lt;/strong&gt;&lt;br&gt;
Your custom type feels more natural to work with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full control&lt;/strong&gt;&lt;br&gt;
You decide how your type increments or decrements.&lt;/p&gt;

&lt;h2&gt;
  
  
  That is a wrap
&lt;/h2&gt;

&lt;p&gt;I hope this post helped you understand how user defined increment and decrement operators work in C# 14. If you give them a try, I would love to hear what you come up with. You can find me on almost every social platform at &lt;a href="https://louella.dev/socials" rel="noopener noreferrer"&gt;louella.dev/socials&lt;/a&gt;, or you can leave a comment below.&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>New File-Based Apps in .NET 10: You Can Now Run C# in Just 1 File!</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Mon, 17 Nov 2025 18:25:46 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/file-based-apps-in-net-10-you-can-now-run-c-in-just-1-file-5eji</link>
      <guid>https://dev.to/lovelacecoding/file-based-apps-in-net-10-you-can-now-run-c-in-just-1-file-5eji</guid>
      <description>&lt;p&gt;Hi lovely readers,&lt;/p&gt;

&lt;p&gt;Sometimes you just need a quick script in the language you are most comfortable with, C# for example, but then you have to go through the hassle of creating a solution with a project and a bunch of extra files you probably do not need, just to run ten lines of code. Using C# for a small task has always felt like overkill.&lt;/p&gt;

&lt;p&gt;.NET 10 now fixes this with file-based apps. It introduces a new lightweight execution model that lets you run a C# program contained in a single file with &lt;em&gt;no&lt;/em&gt; project or solution setup at all.&lt;/p&gt;

&lt;p&gt;In this blog post, we are going to take a look at file based apps and how to use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why file-based apps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;No project overhead&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Write your C# code in one &lt;code&gt;.cs&lt;/code&gt; file and run it directly. That is all you need. There is no &lt;code&gt;.csproj&lt;/code&gt; file, no solution, and no boilerplate. This simplicity means you can get started right away when you want to build a quick tool or demo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Great for prototyping and scripting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;File-based apps are perfect for prototypes, one off console utilities, CI or CD scripts, or quick data processing tasks. Instead of creating a full project for a ten line script, you can just run a single file. It makes C# feel competitive with traditional scripting languages like PowerShell or Bash.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Full power of C# and .NET&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You are still writing a real C# program. You get the strong type system, performance, LINQ, the full .NET libraries, and even NuGet packages. Nothing is limited just because you are using one file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Full-on CLI support&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This feature is built right into the .NET CLI. No extra tools or interpreters are required. Just run &lt;code&gt;dotnet run &amp;lt;YourFile&amp;gt;.cs&lt;/code&gt; and the CLI takes care of the rest. On Unix like systems, you can even add a shebang so you can run your file like a regular script.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Easy to scale up&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A file-based app is not something you will outgrow. If your single file script becomes something larger, the .NET 10 SDK includes a tool that converts it into a full project with a &lt;code&gt;.csproj&lt;/code&gt;, keeping your package references and settings.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How to use file-based apps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create and run a single file program
&lt;/h3&gt;

&lt;p&gt;To get started, all you need is the .NET 10 SDK installed. You can install it from &lt;a href="http://dotnet.microsoft.com/" rel="noopener noreferrer"&gt;dotnet.microsoft.com&lt;/a&gt;. In whatever text editor or IDE you want write your code in a single C# file. You can use top-level statements that were introduced in the past so you don’t need a Main method.&lt;/p&gt;

&lt;p&gt;For example, create a file called &lt;code&gt;DiceThrow.cs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// DiceThrow.cs&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;rng&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Random&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;roll&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rng&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;7&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;$"You rolled a &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;roll&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open your terminal in the same folder and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet run DiceThrow.cs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI creates a temporary project in the cache, compiles your file, and runs it. The first run takes a moment, but after that it launches almost instantly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using NuGet packages with &lt;code&gt;#:package&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Sometimes you will need some extra help from a NuGet package. You can add those to your script too. If your script needs a NuGet package, you can add it at the top of your file.&lt;/p&gt;

&lt;p&gt;For example, here is a script that uses Figgle to create ASCII art. Save it as &lt;code&gt;ASCIIArt.cs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;package&lt;/span&gt; &lt;span class="n"&gt;Figgle&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="m"&gt;0.6&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;
&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;package&lt;/span&gt; &lt;span class="n"&gt;Figgle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fonts&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="m"&gt;0.6&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;

&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Figgle&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Figgle.Fonts&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FiggleFonts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Standard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello World"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgqi83fbpbjgrqwesdku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgqi83fbpbjgrqwesdku.png" alt="Terminal with Hello World in ASCII" width="786" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The version numbers after the at sign are required. If you are not sure which version to use, the NuGet Gallery page shows a ready to copy snippet under the File-Based Apps tab. For example, &lt;a href="https://www.nuget.org/packages/Figgle/" rel="noopener noreferrer"&gt;the Figgle NuGet Gallery page looks like this&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimuqdd4im8c06tu54jo6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimuqdd4im8c06tu54jo6.png" alt="Nuget Gallery page of Figgle with the File-based app tab selected" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Running your C# file as a script on Unix
&lt;/h3&gt;

&lt;p&gt;If you like the convenience of running scripts directly, you can add a shebang to the top of your file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="p"&gt;!/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt; &lt;span class="n"&gt;dotnet&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello from shebang!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make it executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x Shebang.cs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally run it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./Shebang.cs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It feels just like running any other script.&lt;/p&gt;

&lt;h2&gt;
  
  
  To keep in mind
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Only one file is supported right now. Multi file support is coming in .NET 11.&lt;/li&gt;
&lt;li&gt;These are compiled C# programs, not interpreted scripts.&lt;/li&gt;
&lt;li&gt;You can debug your script in your IDE by opening the file and setting breakpoints.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  That is a wrap
&lt;/h2&gt;

&lt;p&gt;File-based apps in .NET 10 make C# feel more flexible and accessible for small tasks. You no longer have to switch to Python or Bash when you want to automate something quickly. Now you can stay in the language you love, with your favorite NuGet packages available right away.&lt;/p&gt;

&lt;p&gt;I hope this post helped you understand file-based apps in modern C#. If you have any questions or comments, feel free to reach out on almost every social media platform (&lt;a href="https://louella.dev/socials" rel="noopener noreferrer"&gt;louella.dev/socials&lt;/a&gt;) or leave a comment down below.&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>csharp</category>
      <category>dotnet</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Create a Git Tag With Github</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Wed, 05 Nov 2025 15:47:16 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/how-to-create-a-git-tag-with-github-18of</link>
      <guid>https://dev.to/lovelacecoding/how-to-create-a-git-tag-with-github-18of</guid>
      <description>&lt;p&gt;Hi lovely readers,&lt;/p&gt;

&lt;p&gt;Have you ever made a new release of a project and wondered how to mark that version properly in Git? Maybe you heard about tags, or maybe someone told you to create one, but you were not sure how. The good news is that GitHub makes this very easy. You can create a Git tag directly from the GitHub web page, without using the command line.&lt;/p&gt;

&lt;p&gt;In this guide, we will look at what a tag is, why you might use one, and how to create a tag on GitHub step by step.&lt;/p&gt;

&lt;p&gt;If you like clean versioning, simple releases, or just want to keep your project organised, keep reading.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why create a Git tag
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Keep track of versions
&lt;/h3&gt;

&lt;p&gt;A tag is like a label that points to a specific commit. When you release version 1.0, you probably want to tag it as &lt;code&gt;v1.0.0&lt;/code&gt; or something similar. This makes it easy to find the code for that version later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Great for releases
&lt;/h3&gt;

&lt;p&gt;Tags are often used when publishing release notes or downloadable builds. GitHub will even bundle your source code and make it available as a download.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clear project history
&lt;/h3&gt;

&lt;p&gt;With tags, you can quickly see when major versions were created. This helps you and your team understand the history of the code.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to create a tag on GitHub
&lt;/h2&gt;

&lt;p&gt;You can create a Git tag directly from the GitHub web interface. Here is how to do it.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Open your repository
&lt;/h3&gt;

&lt;p&gt;Go to the GitHub repository where you want to create a tag. Make sure you are logged in and have the right access.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yolkqb3gulpeh2z2xq9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yolkqb3gulpeh2z2xq9.png" alt=" " width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Go to Releases
&lt;/h3&gt;

&lt;p&gt;At the right of the repository, Look for &lt;strong&gt;Releases&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;Create a new release&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo90gwid0yrcfboay99jx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo90gwid0yrcfboay99jx.png" alt=" " width="607" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Choose or create a tag
&lt;/h3&gt;

&lt;p&gt;At the top of the release form, you will see &lt;strong&gt;Choose a tag&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  If the tag already exists, you can select it.&lt;/li&gt;
&lt;li&gt;  If you want a new tag, type a name like &lt;code&gt;v1.0.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  GitHub will show an option to &lt;strong&gt;Create new tag&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Click it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvev8tbespe1ecp8z57g0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvev8tbespe1ecp8z57g0.png" alt=" " width="781" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi0n204r6njrl2jnykw4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi0n204r6njrl2jnykw4.png" alt=" " width="535" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Add release details (optional)
&lt;/h3&gt;

&lt;p&gt;You can give your release a title and a description. Many people write a short changelog or a summary of what is new.&lt;/p&gt;

&lt;p&gt;You can also upload files, such as compiled builds or release assets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwi7idgroc9daz2aoz8ei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwi7idgroc9daz2aoz8ei.png" alt=" " width="800" height="767"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Publish
&lt;/h3&gt;

&lt;p&gt;Click &lt;strong&gt;Publish release&lt;/strong&gt;.&lt;br&gt;
Your tag now exists in the repository.&lt;/p&gt;


&lt;h2&gt;
  
  
  Where to see your tags
&lt;/h2&gt;

&lt;p&gt;Once you clicked &lt;strong&gt;Publish release&lt;/strong&gt; the release page should pop up. In here you can download all your code as a ZIP or TAR.GZ and share it easily with others.&lt;/p&gt;

&lt;p&gt;You can find the release page after closing on the right side of your repository page where you clicked &lt;code&gt;create a new release&lt;/code&gt; just moments ago.&lt;/p&gt;

&lt;p&gt;You can also fetch tags in Git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch &lt;span class="nt"&gt;--tags&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quick summary
&lt;/h2&gt;

&lt;p&gt;Go to GitHub repository: Releases &amp;gt; Draft a new release &amp;gt; Type tag name&lt;br&gt;
Tag a specific commit: Choose branch or commit in dropdown&lt;br&gt;
Add release notes: Fill title and description&lt;/p&gt;

&lt;h2&gt;
  
  
  That is a wrap
&lt;/h2&gt;

&lt;p&gt;Creating Git tags on GitHub is simple and clear. You do not need the command line at all. Tags help you mark important versions, share releases with users, and keep your project history organised.&lt;/p&gt;

&lt;p&gt;I hope this guide helped you understand how to create a Git tag from the GitHub web page. If you have questions or comments, you can reach me on &lt;strong&gt;&lt;a class="mentioned-user" href="https://dev.to/lovelacecoding"&gt;@lovelacecoding&lt;/a&gt;&lt;/strong&gt; on most social media platforms, or leave a comment.&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>github</category>
      <category>programming</category>
    </item>
    <item>
      <title>Modern C# Development: Target-Typed `new`</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Fri, 31 Oct 2025 13:07:25 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/modern-c-development-target-typed-new-468k</link>
      <guid>https://dev.to/lovelacecoding/modern-c-development-target-typed-new-468k</guid>
      <description>&lt;p&gt;Hi lovely readers,&lt;/p&gt;

&lt;p&gt;Have you ever found yourself typing the same type name twice when creating an object in C#? For example &lt;code&gt;Person person = new Person();&lt;/code&gt; feels a little repetitive, doesn’t it?&lt;/p&gt;

&lt;p&gt;Modern C# fixes this small annoyance with a simple but powerful feature called &lt;strong&gt;target-typed &lt;code&gt;new&lt;/code&gt;&lt;/strong&gt;. It helps you write cleaner, shorter, and more readable code while keeping everything strongly typed.&lt;/p&gt;

&lt;p&gt;In this blog post, we are going to explore &lt;strong&gt;target-typed &lt;code&gt;new&lt;/code&gt;&lt;/strong&gt;, when to use it, and how it can make your code a little bit nicer to look at.&lt;/p&gt;

&lt;p&gt;Does your application create a lot of objects? Do you like tidy syntax and less typing? Continue reading and I’ll show you how.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why target-typed &lt;code&gt;new&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cleaner code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Target-typed &lt;code&gt;new&lt;/code&gt; lets the compiler infer the type from the context. You no longer have to repeat it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;   &lt;span class="c1"&gt;// Before&lt;/span&gt;
   &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

   &lt;span class="c1"&gt;// Now&lt;/span&gt;
   &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The compiler already knows the type on the left side, so you can safely skip it on the right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Works with fields and properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use it for field or property initialization too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;   &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;HttpClient&lt;/span&gt; &lt;span class="n"&gt;_client&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
   &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_items&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Great for readability with long type names&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It really shines when dealing with complex or generic types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;   &lt;span class="n"&gt;Dictionary&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
   &lt;span class="n"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;)&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;queue&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Still fully typed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is not dynamic or weak typing. The compiler still checks everything, exactly like before.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to use target-typed &lt;code&gt;new&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Target-typed &lt;code&gt;new&lt;/code&gt; works whenever the compiler can &lt;strong&gt;infer the type&lt;/strong&gt; of the object from context. That includes variable declarations, field initializers, property initializers, and even return statements.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Variable declarations&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Bob"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;Car&lt;/span&gt; &lt;span class="n"&gt;car&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Tesla"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Model 3"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Properties and fields&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Library&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Books&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;HttpClient&lt;/span&gt; &lt;span class="n"&gt;_client&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Return statements&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When the method return type is known, you can use target-typed &lt;code&gt;new&lt;/code&gt; in returns too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;Point&lt;/span&gt; &lt;span class="nf"&gt;CreatePoint&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;p&gt;Target-typed &lt;code&gt;new&lt;/code&gt; only works when the compiler can clearly determine the type. If the type is ambiguous, you’ll get an error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// ❌ Error: cannot infer the type&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also doesn’t work with anonymous types or cases where there’s no obvious target type.&lt;/p&gt;




&lt;h2&gt;
  
  
  Comparing &lt;code&gt;var&lt;/code&gt; and target-typed &lt;code&gt;new&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Both &lt;code&gt;var&lt;/code&gt; and target-typed &lt;code&gt;new&lt;/code&gt; reduce repetition, but they do it differently.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;How type is inferred&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;var&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;var p = new Person("Alice");&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;From the right-hand side&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Target-typed &lt;code&gt;new&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Person p = new("Alice");&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;From the left-hand side&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Use whichever makes the code clearer in that context. &lt;code&gt;var&lt;/code&gt; is great when the type on the right is obvious. Target-typed &lt;code&gt;new&lt;/code&gt; is better when you want to make the type explicit but avoid repeating it.&lt;/p&gt;




&lt;h2&gt;
  
  
  A few more examples
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="n"&gt;CancellationTokenSource&lt;/span&gt; &lt;span class="n"&gt;cts&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;Tuple&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pair&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each of these lines is shorter, cleaner, and easier to scan.&lt;/p&gt;




&lt;h2&gt;
  
  
  That’s a wrap
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Target-typed &lt;code&gt;new&lt;/code&gt;&lt;/strong&gt; helps remove small bits of repetition and keeps your codebase neat. It’s one of those small features that doesn’t change how C# works but makes writing and reading code more enjoyable.&lt;/p&gt;

&lt;p&gt;Whether you’re defining data models, initializing services, or just cleaning up long generic types, target-typed &lt;code&gt;new&lt;/code&gt; makes your code look modern and elegant.&lt;/p&gt;

&lt;p&gt;I hope this post helped you understand target-typed &lt;code&gt;new&lt;/code&gt; in modern C#. If you have any questions or comments, feel free to reach out on &lt;a class="mentioned-user" href="https://dev.to/lovelacecoding"&gt;@lovelacecoding&lt;/a&gt; on pretty much every social media platform or leave a comment down below.&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>csharp</category>
      <category>beginners</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Modern C# Development: Get Started With Params Collections</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Tue, 19 Aug 2025 20:00:47 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/modern-c-development-get-started-with-params-collections-1857</link>
      <guid>https://dev.to/lovelacecoding/modern-c-development-get-started-with-params-collections-1857</guid>
      <description>&lt;p&gt;Hi lovely readers,&lt;/p&gt;

&lt;p&gt;We have all written APIs that want a flexible "give me as many values as you like" parameter, then ended up juggling arrays and awkward call sites. Modern C# fixes this in two steps. C# 12 added &lt;strong&gt;collection expressions&lt;/strong&gt; (&lt;code&gt;[1, 2, 3]&lt;/code&gt;). C# 13 lets &lt;strong&gt;&lt;code&gt;params&lt;/code&gt; work with more than arrays&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;In this blog post, we are going to focus on &lt;strong&gt;params collections&lt;/strong&gt; and how to use them cleanly.&lt;/p&gt;

&lt;p&gt;Does your application pass lots of values to helpers? Do you want fewer allocations and cleaner call sites? Do you want to pair collection expressions with a smarter &lt;code&gt;params&lt;/code&gt;? Continue reading and I will show you how.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why params collections
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Simplicity and readability&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Call methods with a natural, comma separated list. You can write &lt;code&gt;Sum(1, 2, 3)&lt;/code&gt; while the API accepts &lt;code&gt;params ReadOnlySpan&amp;lt;int&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using &lt;code&gt;params ReadOnlySpan&amp;lt;T&amp;gt;&lt;/code&gt; or &lt;code&gt;params Span&amp;lt;T&amp;gt;&lt;/code&gt; can avoid heap allocations for many calls. Less GC pressure, tighter loops.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The right type for the job&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Choose &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt; when you only need to iterate, &lt;code&gt;IReadOnlyList&amp;lt;T&amp;gt;&lt;/code&gt; when you want indexing, or spans when you want minimal overhead.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Works with C# 12 collection expressions&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Collection expressions like &lt;code&gt;[1, 2, 3]&lt;/code&gt; and spreads like &lt;code&gt;[..existing]&lt;/code&gt; compose nicely with &lt;code&gt;params&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Fewer overloads to maintain&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One &lt;code&gt;params&lt;/code&gt; signature often replaces several "convenience" overloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use params collections
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Initialize a &lt;code&gt;params&lt;/code&gt; span (fast path)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;ReadOnlySpan&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="p"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Clean calls:&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;     &lt;span class="c1"&gt;// 6&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;            &lt;span class="c1"&gt;// 0&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;]));&lt;/span&gt;   &lt;span class="c1"&gt;// 15&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why this is nice: literals and many temporaries become allocation free, arrays convert to spans implicitly, and the method communicates read only intent.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tip: add &lt;code&gt;scoped&lt;/code&gt; for extra safety with spans&lt;br&gt;
&lt;code&gt;static void Print(params scoped ReadOnlySpan&amp;lt;char&amp;gt; chars) { /* ... */ }&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Use an interface when flexibility matters
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Collections.Generic&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Linq&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;" | "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"alpha"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"beta"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;                         &lt;span class="c1"&gt;// comma separated&lt;/span&gt;
&lt;span class="nf"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;"gamma"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"delta"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;                      &lt;span class="c1"&gt;// collection expression&lt;/span&gt;
&lt;span class="nf"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"epsilon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"zeta"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;             &lt;span class="c1"&gt;// array&lt;/span&gt;
&lt;span class="nf"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"eta"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"theta"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;     &lt;span class="c1"&gt;// list&lt;/span&gt;
&lt;span class="nf"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Enumerable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;Select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s"&gt;$"v&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When &lt;code&gt;params&lt;/code&gt; targets an interface, callers can pass almost anything iterable.&lt;/p&gt;

&lt;h3&gt;
  
  
  C# 12 vs C# 13 calling styles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;C# 12&lt;/strong&gt;: you could pass a single collection expression to compatible parameters, for example &lt;code&gt;WriteSpan([1, 2, 3])&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C# 13&lt;/strong&gt;: the expanded &lt;code&gt;a, b, c&lt;/code&gt; form works with non array params such as spans and common interfaces.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// C# 12 style&lt;/span&gt;
&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;WriteSpan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Span&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;WriteSpan&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="c1"&gt;// C# 13 params collections&lt;/span&gt;
&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;WriteSpan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;Span&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;WriteSpan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;    &lt;span class="c1"&gt;// expanded form&lt;/span&gt;
&lt;span class="nf"&gt;WriteSpan&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;           &lt;span class="c1"&gt;// empty is fine&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Calling styles and formatting
&lt;/h2&gt;

&lt;p&gt;You can mix and match expanded arguments, arrays, lists, and collection expressions. This keeps call sites tidy and expressive.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;IReadOnlyList&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;$"• &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"apples"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"bananas"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// All of these work&lt;/span&gt;
&lt;span class="nf"&gt;Render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"cherries"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"dates"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;Render&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;"eggs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"figs"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="nf"&gt;Render&lt;/span&gt;&lt;span class="p"&gt;([..&lt;/span&gt;&lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"grapes"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Logic with params collections
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Checking argument count
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;EnsureAtLeastOne&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;ReadOnlySpan&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ArgumentException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Give me at least one number."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pattern friendly switches
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nf"&gt;Describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;ReadOnlySpan&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt; &lt;span class="k"&gt;switch&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s"&gt;"empty"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s"&gt;$"one: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s"&gt;$"many (&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)"&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mutating with &lt;code&gt;Span&amp;lt;T&amp;gt;&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Increment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;Span&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;vals&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;vals&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;++)&lt;/span&gt; &lt;span class="n"&gt;vals&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]++;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nf"&gt;Increment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// array converts to Span&amp;lt;int&amp;gt;&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;","&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// 2,3,4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Interop with JSON and serialization
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;params&lt;/code&gt; is a call site feature. When data comes from JSON, you typically deserialize to a collection, then pass it to your &lt;code&gt;params&lt;/code&gt; method in one of these ways:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Text.Json&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Imagine incoming JSON: [1,2,3]&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;arr&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;JsonSerializer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Deserialize&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;]&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"[1,2,3]"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Any of these calls are fine&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;!));&lt;/span&gt;     &lt;span class="c1"&gt;// array&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;([..&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;!]));&lt;/span&gt; &lt;span class="c1"&gt;// collection expression&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can keep your APIs clean and still play nicely with serialized payloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conditions
&lt;/h2&gt;

&lt;p&gt;You can use &lt;code&gt;if&lt;/code&gt; and &lt;code&gt;switch&lt;/code&gt; with &lt;code&gt;params&lt;/code&gt; data just like any other collection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Validate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;ReadOnlySpan&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;TimeSpan&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;delays&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delays&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;InvalidOperationException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Too many delays."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Compare sequences
&lt;/h2&gt;

&lt;p&gt;Here is a small helper that counts how many times adjacent values differ. It uses &lt;code&gt;params ReadOnlySpan&amp;lt;int&amp;gt;&lt;/code&gt; so common call sites are allocation free.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;CountTransitions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;params&lt;/span&gt; &lt;span class="n"&gt;ReadOnlySpan&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;++)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;++;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;CountTransitions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// 2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Gotchas and notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;params&lt;/code&gt; must be the last parameter, and you can have only one &lt;code&gt;params&lt;/code&gt; parameter.&lt;/li&gt;
&lt;li&gt;You cannot combine &lt;code&gt;params&lt;/code&gt; with &lt;code&gt;ref&lt;/code&gt;, &lt;code&gt;out&lt;/code&gt;, or &lt;code&gt;in&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Prefer &lt;code&gt;ReadOnlySpan&amp;lt;T&amp;gt;&lt;/code&gt; for read only hot paths. Prefer &lt;code&gt;Span&amp;lt;T&amp;gt;&lt;/code&gt; when you need in place edits. Prefer &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt; or &lt;code&gt;IReadOnlyList&amp;lt;T&amp;gt;&lt;/code&gt; when you want flexibility or indexing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  That is a wrap
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Params collections&lt;/strong&gt; make APIs nicer to call and often faster, especially when you pick spans for performance sensitive paths. Pair them with &lt;strong&gt;collection expressions&lt;/strong&gt; from C# 12 and you get clean call sites, fewer allocations, and clearer intent. Whether you are building utility libraries, formatting helpers, or high throughput services, params collections can simplify your codebase.&lt;/p&gt;

&lt;p&gt;I hope this post helped you understand params collections in modern C#. If you have any questions or comments, feel free to reach out on &lt;a class="mentioned-user" href="https://dev.to/lovelacecoding"&gt;@lovelacecoding&lt;/a&gt; on almost every social media platform or leave a comment down below.&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>csharp</category>
      <category>dotnet</category>
      <category>programming</category>
    </item>
    <item>
      <title>Build a C# Console Chatbot with Semantic Kernel &amp; Azure OpenAI</title>
      <dc:creator>Lou Creemers</dc:creator>
      <pubDate>Tue, 15 Jul 2025 21:28:53 +0000</pubDate>
      <link>https://dev.to/lovelacecoding/build-a-c-console-chatbot-with-semantic-kernel-azure-openai-27og</link>
      <guid>https://dev.to/lovelacecoding/build-a-c-console-chatbot-with-semantic-kernel-azure-openai-27og</guid>
      <description>&lt;p&gt;Hey lovely readers,&lt;/p&gt;

&lt;p&gt;This guide shows you how to connect Microsoft Semantic Kernel, keep your API key safe with &lt;strong&gt;User Secrets&lt;/strong&gt;, and stream answers from GPT‑4o‑Mini inside a .NET console app.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Why use Semantic Kernel?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/microsoft/semantic-kernel" rel="noopener noreferrer"&gt;Semantic Kernel&lt;/a&gt; (SK) is a lightweight library that helps your code talk to language models. It works with Azure OpenAI, Azure AI Foundry models like Mixtral or Phi‑3, and even local models. The key benefits are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easy to swap models:&lt;/strong&gt; you register each model as a service and switch when needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built in chat history:&lt;/strong&gt; a &lt;code&gt;ChatHistory&lt;/code&gt; object remembers what was said and lets you choose how much context to send.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plugins:&lt;/strong&gt; you can expose your own C# methods so the model can call them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model agnostic:&lt;/strong&gt; one code base can run on GPT‑4o today and Llama 3 tomorrow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this post we keep things small. No plugins, no tools. We just stream answers from GPT‑4o‑Mini to the console. Just so you know how to set up a quick and easy project with Semantic Kernel.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. What you need
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Version I used&lt;/th&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;.NET SDK&lt;/td&gt;
&lt;td&gt;8.0 or 9.0&lt;/td&gt;
&lt;td&gt;Everything above 7 works; you can also try the .NET 10 preview&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure subscription&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;td&gt;Needed to create an &lt;strong&gt;Azure OpenAI&lt;/strong&gt; resource and an &lt;strong&gt;Azure AI Foundry&lt;/strong&gt; project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT‑4o‑Mini deployment&lt;/td&gt;
&lt;td&gt;Global Standard&lt;/td&gt;
&lt;td&gt;Real time chat requires this type, not Batch Standard&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  2.1. Get started with a console app
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Make a new console app&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;SKConsole &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;SKConsole
dotnet new console &lt;span class="nt"&gt;-n&lt;/span&gt; SKConsole
&lt;span class="nb"&gt;cd &lt;/span&gt;SKConsole

&lt;span class="c"&gt;# Add NuGet packages&lt;/span&gt;
 dotnet add package Microsoft.SemanticKernel
 dotnet add package Microsoft.SemanticKernel.AzureOpenAI
 dotnet add package Microsoft.Extensions.Configuration
 dotnet add package Microsoft.Extensions.Configuration.UserSecrets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2.2 Save your API key with User Secrets
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet user-secrets init                      &lt;span class="c"&gt;# adds &amp;lt;UserSecretsId&amp;gt; to the .csproj&lt;/span&gt;
dotnet user-secrets &lt;span class="nb"&gt;set &lt;/span&gt;OPENAI_API_KEY &lt;span class="s2"&gt;"&amp;lt;your‑key&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;dotnet run&lt;/code&gt; can now read the key at runtime, and the secret stays out of Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The whole program
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Program.cs  (top level statements)&lt;/span&gt;

&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.SemanticKernel&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.SemanticKernel.ChatCompletion&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.Extensions.Configuration&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// 1) Load User Secrets and other config&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;configuration&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ConfigurationBuilder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddUserSecrets&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Program&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// 2) Build the kernel and add our GPT‑4o‑Mini deployment&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;kernel&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Kernel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CreateBuilder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddAzureOpenAIChatCompletion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;deploymentName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"o4-mini"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// name shown in the Azure AI Foundry portal&lt;/span&gt;
        &lt;span class="n"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;       &lt;span class="s"&gt;"https://myfoundryresource.openai.azure.com/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// endpoint in the Azure AI Foundry resource overview&lt;/span&gt;
        &lt;span class="n"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;         &lt;span class="n"&gt;configuration&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"OPENAI_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="c1"&gt;// apikey in the Azure AI Foundry resource&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;chat&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetRequiredService&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IChatCompletionService&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;

&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;systemPrompt&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"You are a concise assistant."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//alter this to change the personality of your chatbot&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Ask me anything (press Enter on empty line to quit)"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ReadLine&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsNullOrWhiteSpace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//if enter is pressed without input, exit the program&lt;/span&gt;

    &lt;span class="c1"&gt;// Build a short chat history: system + last user message&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ChatHistory&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;turn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddSystemMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;systemPrompt&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;turn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddUserMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetStreamingChatMessageContentsAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;turn&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What the important lines do
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;AddUserSecrets&amp;lt;Program&amp;gt;()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Loads &lt;em&gt;secrets.json&lt;/em&gt; into &lt;code&gt;IConfiguration&lt;/code&gt; so you can read the key.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;AddAzureOpenAIChatCompletion&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Registers the chat model as a service.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;deploymentName&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Must match the name you see in the Azure AI Foundry portal.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Use the &lt;code&gt;openai.azure.com&lt;/code&gt; host with this builder.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chat loop&lt;/td&gt;
&lt;td&gt;Sends the system prompt and the latest user question. The model replies in streaming mode.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  4. Frequent errors and quick fixes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Error&lt;/th&gt;
&lt;th&gt;Why it happens&lt;/th&gt;
&lt;th&gt;How to fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;404 Resource not found&lt;/td&gt;
&lt;td&gt;Wrong deployment name or wrong endpoint&lt;/td&gt;
&lt;td&gt;Use the &lt;code&gt;openai.azure.com&lt;/code&gt; URL and the exact deployment name.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;400 OperationNotSupported&lt;/td&gt;
&lt;td&gt;You used a Batch deployment with the chat API&lt;/td&gt;
&lt;td&gt;Deploy the model as Global Standard.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API key is null&lt;/td&gt;
&lt;td&gt;Key not loaded before use&lt;/td&gt;
&lt;td&gt;Make sure &lt;code&gt;AddUserSecrets&lt;/code&gt; comes before you read the key.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  5. Next steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Switch models:&lt;/strong&gt; Use &lt;code&gt;AddAzureAIInferenceChatCompletion&lt;/code&gt; and the Foundry endpoint to chat with Phi‑3, Llama 3, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add memory:&lt;/strong&gt; Store the full chat and use reducers to keep token costs low.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Try plugins and function calls:&lt;/strong&gt; Mark C# methods with &lt;code&gt;[KernelFunction]&lt;/code&gt; so the model can run them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build agents:&lt;/strong&gt; Combine many skills to reach goals automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use local models:&lt;/strong&gt; Connect SK to Ollama or LMStudio with a simple HTTP wrapper.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  That's a wrap!
&lt;/h2&gt;

&lt;p&gt;If you liked this guide, please leave a comment or reach out on social media. I plan to write more posts about memory, plugins, agents, local models, and other cool parts of Semantic Kernel. Stay tuned and happy coding! 🍀&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>ai</category>
      <category>azure</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
