What is the use and point of unbound wildcards generics in Java?

An unbound type can be useful when your method doesn’t really care about the actual type. A primitive example would be this: public void printStuff(Iterable<?> stuff) { for (Object item : stuff) { System.out.println(item); } } Since PrintStream.println() can handle all reference types (by calling toString()), we don’t care what the actual content of that … Read more

CS1607: The version specified for the ‘file version’ is not in the normal ‘major.minor.build.revision’ format in .NET

You’re assuming that the problem is with this line: [assembly: AssemblyVersion(“3.0.*”)] when it is actually with this one: [assembly: AssemblyFileVersion(“3.0.*”)] Like the accepted answer to the question that you say is not a duplicate of this one says: For the AssemblyFileVersionAttribute you cannot use the * special character so you have to provide a full … Read more

Wildcard equivalent in C# generics

Generics in C# make stronger guarantees than generics in Java. Therefore, to do what you want in C#, you have to let the GeneralPropertyMap<T> class inherit from a non-generic version of that class (or interface). public class GeneralPropertyMap<T> : GeneralPropertyMap { } public class GeneralPropertyMap { // Only you can implement it: internal GeneralPropertyMap() { … Read more

getElementById() wildcard

In one of the comments you say: (…) IE is anyway banned on my page, because he doesn’t get it with CSS. It’s an admin tool for developer, so only a few people, and they will anyway use FF I think you should follow a different approach from the beginning, but for what it’s worth, … Read more