no default constructor exists for class

If you define a class without any constructor, the compiler will synthesize a constructor for you (and that will be a default constructor — i.e., one that doesn’t require any arguments). If, however, you do define a constructor, (even if it does take one or more arguments) the compiler will not synthesize a constructor for … Read more

Nested Java enum definition – does declaring as static make a difference? [duplicate]

No, it makes no difference. However the reason is not because it is a member declaration inside an interface, as Jon says. The real reason is according to language spec (8.9) that Nested enum types are implicitly static. It is permissable to explicitly declare a nested enum type to be static. At the following example … Read more

How do I alias a class name in C#, without having to add a line of code to every file that uses the class?

You can’t. The next best thing you can do is have using declarations in the files that use the class. For example, you could rewrite the dependent code using an import alias (as a quasi-typedef substitute): using ColorScheme = The.Fully.Qualified.Namespace.Outlook2007ColorScheme; Unfortunately this needs to go into every scope/file that uses the name. I therefore don’t … Read more