Is the Type
object a reference type?
Let's say I have this code:
String s = "AAA";
Type b = s.GetType();
Does b
point at a type object located on heap?
How can we create a TYPE object for an abstract class?
Again this code:
String s = "AAA";
Type b = s.GetType();
How can s.GetType();
create a TYPE object if this is an abstract class?
You can't create instance of abstract class.
So Object.GetType() method, return a type derived from System.Type, namely System.RuntimeType - This i understand. BUT which object returns by typeof(object)? It should be a type that also derived from System.Type, since type class itself is abstract. what the name of this type?
You could easily get information about this on the official documentation. Please refer the docs
Type does not point to the actual objects. It just gets the information on the Type of the object.
As you cannot create an instance of an abstract class, you would not be able to invoke the GetType on that class.