Is there a generic type such as void* or C#'s object?

Jack jckj33 at gmail.com
Sat Feb 6 02:01:28 UTC 2021


in C/C++ you have void* and C#'s object, to create a variable to 
hold a genetic type. So in C# you can do:

class A {
   object foo;
}

and

var a = new A();
a.foo = any class...;

does D have something like this or template parameters are used 
instead of?


More information about the Digitalmars-d-learn mailing list