I started using reflection in my project.
When I create a type and I want to specify the TypeAttributes, I have two options:
AnsiClass
and Class
. They are both set to 0 in the enum TypeAttributes
.
public enum TypeAttributes
{
// LPTSTR is interpreted as ANSI.
AnsiClass = 0,
//
// Summary:
// Specifies that the type is a class.
Class = 0,
...
1- What's an ANSI Class
(I noticed that, it's related to the LPTSTR
, but I didn't understood well enough)?
2- What's the difference between an AnsiClass
and a Class
when I use Reflection
.
EDIT
Here's an example of specifying the TypeAttributes in Reflection:
TypeBuilder typeBuilder = mbuilder.DefineType("DataRow", TypeAttributes.Public | TypeAttributes.AnsiClass | TypeAttributes.Class);
TypeAttributes
on MSDN: msdn.microsoft.com/en-us/library/… – Determined