Top "Type-parameter" questions

A type parameter is a parameter whose value is a type.

Scala - creating a type parametrized array of specified length

If in Scala IDE try the following: val chars = Array[Char](256) it is all fine. But if I do this: …

arrays scala type-parameter
What's wrong with this reflection code? GetFields() is returning an empty array

C#, Net 2.0 Here's the code (I took out all my domain-specific stuff, and it still returns an empty array): using …

c# reflection type-parameter
How to instantiate an instance of type represented by type parameter in Scala

example: import scala.actors._ import Actor._ class BalanceActor[T <: Actor] extends Actor { val workers: Int = 10 private lazy val actors = …

scala generics type-parameter
Scala passing type parameters to object

In Scala v 2.7.7 I have a file with class Something[T] extends Other object Something extends OtherConstructor[Something] This throws …

scala object type-parameter
How do I make a class generic for all Numeric Types?

I am trying to create a Vector class that is generic for all numeric types. my original attempt was to …

scala polymorphism type-parameter
where t : multiple classes

List<T> Foo<T>(Ilist list) where T : ?? is there any way to enforce T to …

c# generics type-parameter
Why does VS warn me that typeof(T) is never the provided type in a generic method where the type parameter is restricted to implement T?

I hope the question is correct, so let's give you an example. Imagine the following generic method: public abstract class …

c# visual-studio generics type-parameter
Use derived type in base abstract class

Ok, I have a number of different classes deriving from a base class. This base class is an abstract containing …

c# inheritance type-parameter
Understanding “inferred type arguments do not conform to type parameter bounds” errors in Scala

I fail to understand why I am getting an “inferred type arguments do not conform to type parameter bounds”. First, …

scala types type-parameter
Callback with generic type parameter in Dart

I'm trying to define a callback function that needs to accept a generic parameter and return a value of the …

generics dart type-parameter dart-2