> Does anyone know why the codedom puts a '@' next to the type when generating
> a field? does anyone know how to get rid of it?...
[quoted text clipped - 5 lines]
>
> private @bool _boolfield;
That's to avoid it being confused with the keyword "bool" in C#.
Basically it thinks you're trying to refer to a type called "bool"
instead of System.Boolean.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jarlaxle - 27 Mar 2008 18:16 GMT
is there a way to tell it not to do that?
I have some types read in as strings from a file. the types could be
user-defined or primitive types.
i just want it to use whatever string i tell it to.
> > Does anyone know why the codedom puts a '@' next to the type when generating
> > a field? does anyone know how to get rid of it?...
[quoted text clipped - 10 lines]
> Basically it thinks you're trying to refer to a type called "bool"
> instead of System.Boolean.
Jon Skeet [C# MVP] - 27 Mar 2008 18:25 GMT
> is there a way to tell it not to do that?
>
> I have some types read in as strings from a file. the types could be
> user-defined or primitive types.
>
> i just want it to use whatever string i tell it to.
I don't know, to be honest. You might want to just have a map from the
primitive names to the CLR types.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk