nblockchain/conventions

Easy dotnet conventions to verify

knocte opened this issue · 6 comments

knocte commented
  • Find "" instead of String.Empty/string.Empty
  • Find a .?proj file Foo, find the folder it's in is not named Foo.
  • Find a src/ folder, find folder Foo under it, find .fs/.cs file that doesn't contain word Foo (for namespace).
  • Find a src/ folder, find folder Foo under it, find folder Bar under Foo, find .fs/.cs file in Bar that doesn't contain word Foo.Bar (for namespace).
  • Find <OutputType>Exe</OutputType> in a .?proj file, then find Console. in some .cs/.fs file, then find project file (and folder for it) is not suffixed as Console.
  • Don't find <OutputType>Exe</OutputType> in a .?proj file, then find Console. in some .cs/.fs file.
  • Don't find <OutputType>Exe</OutputType> in a .fsproj file, then find Async.RunSynchronously in some .fs file.
Mersho commented

Does nasted namespaces matters in C#?
for example:

// a nested namespace
namespace SomeNameSpace
{
    public class MyClass
    {
        static void Main()
        {
            Nested.NestedNameSpaceClass.SayHello();
        }
    }

    // a nested namespace
    namespace Nested
    {
        public class NestedNameSpaceClass
        {
            public static void SayHello()
            {
                Console.WriteLine("Hello");
            }
        }
    }
}
knocte commented

I'm afk now, pls discuss with @aarani

aarani commented

Does nasted namespaces matters in C#? for example:

// a nested namespace
namespace Nested
{
	public class NestedNameSpaceClass
	{
		public static void SayHello()
		{
			Console.WriteLine("Hello");
		}
	}
}

What do you mean by nested namespace?

Mersho commented

Does nasted namespaces matters in C#? for example:

// a nested namespace
namespace Nested
{
	public class NestedNameSpaceClass
	{
		public static void SayHello()
		{
			Console.WriteLine("Hello");
		}
	}
}

What do you mean by nested namespace?

I edited my comment to provide the example.

aarani commented

Does nasted namespaces matters in C#? for example:

// a nested namespace
namespace Nested
{
	public class NestedNameSpaceClass
	{
		public static void SayHello()
		{
			Console.WriteLine("Hello");
		}
	}
}

What do you mean by nested namespace?

I edited my comment to provide the example.

In almost 6 years of writing C# code, I've never seen this but if it compiles you can't nuke it.

knocte commented