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 findConsole.
in some .cs/.fs file, then find project file (and folder for it) is not suffixed asConsole
. - Don't find
<OutputType>Exe</OutputType>
in a .?proj file, then findConsole.
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");
}
}
}
}
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
I don't see a nested namespace in the snippet
…On Thu, Aug 17, 2023, 18:02 Afshin Arani ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQ4JZKLUOBGT37VV7RF43XVXT3HANCNFSM6AAAAAA2FQODFA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>