Class and Namespace Name Collision
See original GitHub issueMain class and namespace in which it is declared share the same name.
namespace Spectrogram
{
public class Spectrogram
{
...
This causes some inconvenience when creating an instance.
using Spectrogram;
var spec = new Spectrogram(...);
// CS0118: 'Spectrogram' is a namespace but is used like a type
I know this is a breaking change, but have you considered changing the namespace’s name?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
c# - Namespace & Class name collide
Resource = Rsrc; ? This may help avoid name collision. I'm curious if that would work - but not sure (hence not posting...
Read more >c# - Avoiding conflicting namespace and class name
If you choose some appropriate name, all conflicts can be avoided by the client of your classes, by simply using the full qualified...
Read more >2.9 — Naming collisions and an introduction to namespaces
This error is generally referred to as a naming collision (or naming conflict). If the colliding identifiers are introduced into the same file, ......
Read more >How to avoid name collisions in C ++ class names
I myself use a unique method for class names. The ultimate solution is to use namespaces, Namespaces are not available in Unreal C...
Read more >C# namespace class name conflicts
I recently ran into the following question in the c# challenge mode: "The class names declared in one namespace may conflict with the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks again for raising this issue @lawrence-laz! I ended-up changing it to
SpectrogramGenerator
, updated all the documentation, and released version1.3.0
on NuGet 👍I think I agree with you here!
Expressiveness and readability should be favored over character count…
I’ll sleep on this one for a day or two and come back with fresh eyes before I make a final call! Thanks again for pointing it out @lawrence-laz. I’ll leave this issue open until I fix it and the new package is in NuGet