Friday, August 29, 2008

Reflection

// Emitting Meta Data
public class Demo
{
Assembly a = Assembly.LoadFrom("hello.exe");
Module[] modules = a.GetModules();
Type[] types = modules[0].GetTypes();
MethodInfo[] methods = types[0].GetMethods();
//how about fields and properties
// is it private or public?
}

//>> Assembly Versioning
// major_version.minor_version.build_version.revision

//>> Static Assembly
// Except for static assembly which is created with css etc, dynamic assembly is created in runtime with System.Reflection.Emit namespace
// Private Assebly, Public assemblies(GAC)

//>> GetHashCode()
// A method of System.Object. When an object is used as hashtable key, its GetHashCode method must be overrided.

No comments: