Why can't I use a "Type" to create a new variable in C#?

Posted by CodeGrue on Stack Overflow See other posts from Stack Overflow or by CodeGrue
Published on 2010-04-23T12:56:20Z Indexed on 2010/04/23 13:03 UTC
Read the original article Hit count: 246

Filed under:
|
int number = 5;

Type dynamicType = number.GetType();    // dynamic type is "int"

dynamicType x = (number as dynamicType);

© Stack Overflow or respective owner

Related posts about types

Related posts about c#