Hi Jason,
typeof returns a Type instance that contains all of the type information
for a particular type, this is used for reflection where you want to look
inside a type to see maybe how many methods it has, the return type of a
method etc all dynamically. For example you could use the type information
to get all of the static methods of the string class like:
using System;
//using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
Type t = typeof(string);
MethodInfo[] methods = t.GetMethods();
foreach (MethodInfo method in methods)
{
if(method.IsStatic)
{
Console.WriteLine(method.Name);
}
}
Console.ReadLine();
}
}
}
This is a really quick and brief explanation, start researching more into
reflection to see the power of this information.
Hope that helps
Mark R Dawson
http://www.markdawson.org