About 11,600,000 results
Open links in new tab
  1. More elegant way to write code section dividers in C#?

    Mar 27, 2014 · In C#, when I have different code sections like constants, API functions, helper functions, etc., I would like to divide them. I normally use something like this: public class Foo { …

  2. Using C# Regions To Improve Code Readability - C# Corner

    Regions in C# is a useful feature that helps manage code in areas that can be hidden or visible. Learn how to use regions in Visual Studio to improve code readability.

  3. Understanding Regions in C# - A Handy Code Organization Tool

    Aug 20, 2024 · In C#, a region is a code block that allows you to group related sections of code together. By using regions, you can hide or collapse parts of your code, making it easier to …

  4. Unlocking the Power of C# Regions for Better Code Organization

    Dec 27, 2023 · Regions let you logically group and organize code into collapsible sections. They serve as an extremely useful visual tool for tidying up cluttered code to improve readability and …

  5. Split the main form into smaller files - C# Developer Community

    Feb 20, 2021 · How wrong is splitting code up using public partial class Form1 and what is the correct way. As you can see in documentation inheritance and implemented interfaces are …

  6. How to: Enable outlining (collapsible statement blocks) for C# code

    Jan 29, 2015 · Luckily the solution to this problem is simple – there’s a free Visual Studio Extension called C# Outline and it’s available for Visual Studio 2010, 2012, 2013 & 2015. This …

  7. c# - Coding guides: How do you split up your large source files ...

    Jan 13, 2017 · When a method gets above a dozen lines or so, it should be broken apart. When a class gets above a couple of hundred lines, it should be broken apart. This is the only way to …

  8. How do I Divide Code in Visual Studio: A Comprehensive Guide

    Aug 21, 2024 · By following best practices for code division in Visual Studio, such as using meaningful names, avoiding excessive file sizes, and maintaining consistency in the code …

  9. Collapsing and Hiding Sections of Code - C# Corner

    The #Region directive enables you to collapse and hide sections of code in Visual Basic .NET files. #Region lets you specify a block of code that you can expand or collapse when using the …

  10. The C# Partial Class: Splitting a Class in C# with the Partial Method

    In C#, a single project cannot have two separate classes. But sometimes you do need two classes for it – if the code is bloating the class, for example. In this case, you can use the partial …

Refresh