Reflection typeof

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to accomplish the below, and for some reason keep getting errors saying
Type Expected. can someone assist me?

{
Type t = new typeof(Apple);

---etc
 
Instead try:

Type t = Apple.GetType(); // If Apple is the instance name
Or
Type t = typeof(Apple); // If Apple is the class name

I'm trying to accomplish the below, and for some reason keep getting errors
saying
Type Expected. can someone assist me?

{
Type t = new typeof(Apple);

---etc
 
Back
Top