<?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: Hugh Cumper</title>
    <description>The latest articles on DEV Community by Hugh Cumper (@hcumper).</description>
    <link>https://dev.to/hcumper</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4217939%2Fedf54e44-0add-49a4-bc52-030ab29bb131.png</url>
      <title>DEV Community: Hugh Cumper</title>
      <link>https://dev.to/hcumper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hcumper"/>
    <language>en</language>
    <item>
      <title>Edit C# without braces, without changing your project</title>
      <dc:creator>Hugh Cumper</dc:creator>
      <pubDate>Fri, 30 Oct 2026 20:16:16 +0000</pubDate>
      <link>https://dev.to/hcumper/edit-c-without-braces-without-changing-your-project-544b</link>
      <guid>https://dev.to/hcumper/edit-c-without-braces-without-changing-your-project-544b</guid>
      <description>&lt;p&gt;Many younger programmers grew up on the elegance of Python and get irritated by C# filling their screen with needless squiggles that carry no information that wasn't already right there in the indentation. I'm an old programmer and it irritates me! Relief is at hand.&lt;br&gt;
I’ve built &lt;strong&gt;ICS — Indented C#&lt;/strong&gt;, an editor extension that lets you work with an indented view of your C# code.&lt;/p&gt;

&lt;p&gt;Your project keeps ordinary &lt;code&gt;.cs&lt;/code&gt; files. The compiler, Git and your teammates continue to see C# with braces and semicolons. You can choose the indented view for your own editing.&lt;/p&gt;

&lt;p&gt;Here’s a first walkthrough using VS Code.&lt;/p&gt;

&lt;p&gt;Start by installing &lt;a href="https://marketplace.visualstudio.com/items?itemName=lucid-programming.ics-vscode" rel="noopener noreferrer"&gt;ICS — Indented C# from the Marketplace&lt;/a&gt;. The converter is bundled; on first use, Microsoft’s .NET Install Tool can acquire the runtime it needs.&lt;/p&gt;

&lt;p&gt;Open a C# file, press &lt;strong&gt;F1&lt;/strong&gt;, and run:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ICS: Open C# as ICS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An editable ICS view opens beside the original C#.&lt;/p&gt;

&lt;p&gt;For a small example, take this &lt;code&gt;Invoice.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="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Invoice&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;decimal&lt;/span&gt; &lt;span class="nf"&gt;Total&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;decimal&lt;/span&gt; &lt;span class="n"&gt;price&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="n"&gt;price&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="m"&gt;1.20m&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="m"&gt;5m&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="m"&gt;2m&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;Its ICS view looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Invoice
    public decimal Total(decimal price)
        return price * 1.20m + 5m - 2m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The class and method bodies are expressed through indentation. Their structural braces disappear from the view, along with the statement’s trailing semicolon.&lt;/p&gt;

&lt;p&gt;Both panes are editable.&lt;/p&gt;

&lt;p&gt;In the ICS pane, change &lt;code&gt;5m&lt;/code&gt; to &lt;code&gt;7m&lt;/code&gt;. After a short pause, the C# pane updates:&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;return&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="m"&gt;1.20m&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="m"&gt;7m&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="m"&gt;2m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also edit the C# pane and watch the corresponding ICS view update. Keeping both visible makes it easy to inspect the relationship between what you edit and what your project uses.&lt;/p&gt;

&lt;p&gt;There is an important distinction between &lt;strong&gt;updating the editor buffer&lt;/strong&gt; and &lt;strong&gt;saving the file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;With VS Code’s Auto Save disabled and ICS’s optional automatic saving left off, live synchronization updates the two editor buffers. When you save a valid, synchronized ICS preview with &lt;strong&gt;Ctrl+S&lt;/strong&gt;, ICS saves the corresponding C# back to the original &lt;code&gt;.cs&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Opening the view does not add an &lt;code&gt;.ics&lt;/code&gt; sidecar beside your source file. Standalone ICS export is a separate, optional workflow.&lt;/p&gt;

&lt;p&gt;You can check this yourself:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open a C# file as ICS.&lt;/li&gt;
&lt;li&gt;Make a small edit in the ICS pane.&lt;/li&gt;
&lt;li&gt;Wait for the C# pane to update.&lt;/li&gt;
&lt;li&gt;Save the ICS preview.&lt;/li&gt;
&lt;li&gt;Inspect the &lt;code&gt;.cs&lt;/code&gt; file in another editor or your Git diff.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The saved file contains conventional C#. Your existing project continues to build from that file, with its usual build commands and CI configuration.&lt;/p&gt;

&lt;p&gt;Indentation does matter in the ICS view: moving a statement into or out of a block changes its structure. The generated C# makes that structure explicit again.&lt;/p&gt;

&lt;p&gt;While you are halfway through typing, conversion may temporarily be unavailable. In that case, the other pane keeps its last verified contents and is marked &lt;strong&gt;out of date&lt;/strong&gt;. An incomplete ICS save can preserve a recovery draft without updating the C# source, so check that synchronization has completed before building.&lt;/p&gt;

&lt;p&gt;The side-by-side editing and save workflow described here is &lt;strong&gt;free&lt;/strong&gt;. Pro adds optional automation, including displaying only the ICS view and automatically saving paired C# after successful updates.&lt;/p&gt;

&lt;p&gt;For a first try, leave the defaults in place and keep both panes visible. That gives you a straightforward way to judge the editing experience and inspect the resulting C#.&lt;/p&gt;

&lt;p&gt;ICS also has editor features beyond conversion, including optional project-aware analysis. Those have their own scope and limitations, covered in the &lt;a href="https://github.com/Administrator-Lucid-Programming/ics-support/blob/HEAD/docs/vscode-guide.md" rel="noopener noreferrer"&gt;VS Code guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can start with one file in an existing project. If you try it, I’d be interested in which kinds of C# become easier—or harder—to read in the indented view.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=lucid-programming.ics-vscode" rel="noopener noreferrer"&gt;Install ICS for VS Code&lt;/a&gt; · &lt;a href="https://github.com/Administrator-Lucid-Programming/ics-support/issues" rel="noopener noreferrer"&gt;Report a problem or suggest a feature&lt;/a&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
    </item>
  </channel>
</rss>
