Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is AutoClass in .net?

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.

like image 504
Tilak Avatar asked Jan 17 '13 18:01

Tilak


1 Answers

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.

like image 146
Oded Avatar answered Sep 29 '22 18:09

Oded