Skip to content

Instantly share code, notes, and snippets.

@htbkoo
Last active July 15, 2022 09:22
Show Gist options
  • Select an option

  • Save htbkoo/eb0e93160926ef2fd990600b4c3098c5 to your computer and use it in GitHub Desktop.

Select an option

Save htbkoo/eb0e93160926ef2fd990600b4c3098c5 to your computer and use it in GitHub Desktop.

Revisions

  1. htbkoo revised this gist Jul 15, 2022. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions refactor.cs
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,5 @@
    // A skeleton of a C# program
    using System;

    // Your program starts here:
    Console.WriteLine("Hello world!");
    using System.Collections.Generic;

    namespace SomeNamespace
    {
  2. htbkoo revised this gist Jul 15, 2022. 1 changed file with 12 additions and 15 deletions.
    27 changes: 12 additions & 15 deletions refactor.cs
    Original file line number Diff line number Diff line change
    @@ -4,30 +4,27 @@
    // Your program starts here:
    Console.WriteLine("Hello world!");

    namespace YourNamespace
    namespace SomeNamespace
    {
    class YourClass
    enum OperationType
    {

    }

    struct YourStruct
    interface IOperator
    {
    int operate();
    }

    interface IYourInterface
    {
    }

    delegate int YourDelegate();

    enum YourEnum
    class OperatorA implements IOperator
    {
    int operate() {
    }
    }

    namespace YourNestedNamespace
    class MainClass
    {
    struct YourStruct
    {
    }
    Dictionary<OperationType, IOperator> operatorsMapping = new Dictionary<OperationType, IOperator>();

    }
    }
  3. htbkoo created this gist Jul 15, 2022.
    33 changes: 33 additions & 0 deletions refactor.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    // A skeleton of a C# program
    using System;

    // Your program starts here:
    Console.WriteLine("Hello world!");

    namespace YourNamespace
    {
    class YourClass
    {
    }

    struct YourStruct
    {
    }

    interface IYourInterface
    {
    }

    delegate int YourDelegate();

    enum YourEnum
    {
    }

    namespace YourNestedNamespace
    {
    struct YourStruct
    {
    }
    }
    }