FieldAttributes TO MethodAttributes. Or from MethodAttributes TO
TypeAttributes

excuse me for my bad english :)

On 1 дек, 10:24, Stanislav <[email protected]> wrote:
> Hello! I often want to copy the attributes of FieldAttributes in
> MethodAttributes. Or from MethodAttributes in TypeAttributes. And
> despite the fact that they have overlapping fields (Public /
> Protected /...), not possible to simply copy. As can develop
> functional in order to copy these fields it is convenient? Perhaps
> inheritance?
> Ex.:
>
> TypeAttributes has Static, Protected is setted
> I want to create MethodAttributes by TypeAttributes. But I dont want
> to write a  lot of IFs.
>
> if(typedef.Attributes & TypeAttributes.Static != 0) methoddef |=
> MethodAttributes.Static;
> ...

-- 
--
mono-cecil

Reply via email to