Clasification of Reference and Value Types in a Simple Way.

The Following Sample may help you do many tasks such as.

1. Classify Reference Types and value Types
2. Get The .Net Framework Version and Install Path Dynamically
3. List The Primitive Data Types in .net Framework
4. Also Understand how to make progressbar progress according to jobs done in a simple way

The Following Code will retrive the framework path and load the assembly mscorlib.dll and get all the types

static string frameWorkPath = RuntimeEnvironment.GetRuntimeDirectory(); // Gets The Framework Path
static Assembly netAssem = Assembly.LoadFile(frameWorkPath + "\\mscorlib.dll");//Loads The mscorlib.dll to Assembly Object
Type[] allTypes = netAssem.GetTypes(); // Get All Types to an Array of Type

The Following Code will get the Framework version dynamically

label3.Text = "Current Version of .net Framework is : " + RuntimeEnvironment.GetSystemVersion(); // Get Current version of .Net Framework

Checking For Primitive Types

if (dT.IsPrimitive == true)

Checking For Value Type and Reference Type

if (dT.IsValueType == true)

For Making it Much Easy to understand i have uploaded the Sample Code with all functionality and User Interface
Download Full Source Code
Regards Hefin Dsouza


  • Download Full Source Code (27630-11533-IndentifyTypes.rar)
  • Comments

    No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: