8

I was reading Inside C#, and i am stumbled upon Type.IsAutoClass.

The documentation says

true if the string format attribute AutoClass is selected for the Type; otherwise, false.

The question is What is AutoClass and how due it impacts a Type?

Note that this is academic question, and there is no practical usage (to best of my knowledge) in projects, I am associated with.

Tilak
  • 30,108
  • 19
  • 83
  • 131

1 Answers1

5

It is part of the TypeAttributes Enumeration:

AutoClass - LPTSTR is interpreted automatically.

And the remarks:

The members of this enumerator class match the CorTypeAttr enumerator as defined in the corhdr.h file.

So, this is used for interop, in how strings constants are interpreted.

By the way - LPTSTR.

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • in MSDN its stated as ---- If the current Type represents a constructed generic type, this property applies to the generic type definition from which the type was constructed. For example, if the current Type represents MyGenericType, the value of this property is determined by MyGenericType. -- can u explain in simple english a little? – Parimal Raj Jan 17 '13 at 18:20
  • @AppDeveloper: Basically, it means that the value of the type parameter doesn't matter. – SLaks Jan 17 '13 at 18:22
  • @SLaks - and in what case would that matter? – Parimal Raj Jan 17 '13 at 18:23
  • @AppDeveloper: For attributes, never. – SLaks Jan 18 '13 at 17:05