![]() ![]() See the article Dynamically Loading and Using Types. For performing late binding, accessing methods on types created at run time.For examining and instantiating types in an assembly.For more information, see Retrieving Information Stored in Attributes. ![]() When you have to access attributes in your program's metadata.Reflection is useful in the following situations: Obtaining information about the caller to a method.Controlling optimizations by the just-in-time (JIT) compiler so the code remains easy to debug.Specifying characteristics used to enforce security.Describing the security requirements for methods.Describing how to map between class members and XML nodes for XML serialization.Describing which members of a class to serialize for persistence.Describing your assembly in terms of title, version, description, or trademark.Calling unmanaged code using the DllImportAttribute class.Describing the COM properties for classes, methods, and interfaces.For more information, see MarshalAsAttribute. Describing how to marshal method parameters when interoperating with native code.For more information, see WebMethodAttribute. ![]()
0 Comments
Leave a Reply. |