Add a static class to some new solution:
namespace TestStatic
{
public static class StaticClass
{
public static int staticInt = 0;
}
}
From some button press in some container, try the following:
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(typeof(StaticClass).ToString());
MessageBox.Show((typeof(StaticClass) is Object).ToString());
}
Observe the results.
So, a static class is a Type, and an object ! For extra points explain why you cannot use 'GetType() here instead of 'typeof(), and explain why you cannot directly code:
MessageBox.Show((StaticClass is Object).ToString());
:)
best, Bill