{"action":"created","issue":{"url":"https://api.github.com/repos/0xd4d/dnlib/issues/48","labels_url":"https://api.github.com/repos/0xd4d/dnlib/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/0xd4d/dnlib/issues/48/comments","events_url":"https://api.github.com/repos/0xd4d/dnlib/issues/48/events","html_url":"https://github.com/0xd4d/dnlib/issues/48","id":112128843,"number":48,"title":"Can't get method header size","user":{"login":"mazegen","id":6680815,"avatar_url":"https://avatars.githubusercontent.com/u/6680815?v=3","gravatar_id":"","url":"https://api.github.com/users/mazegen","html_url":"https://github.com/mazegen","followers_url":"https://api.github.com/users/mazegen/followers","following_url":"https://api.github.com/users/mazegen/following{/other_user}","gists_url":"https://api.github.com/users/mazegen/gists{/gist_id}","starred_url":"https://api.github.com/users/mazegen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazegen/subscriptions","organizations_url":"https://api.github.com/users/mazegen/orgs","repos_url":"https://api.github.com/users/mazegen/repos","events_url":"https://api.github.com/users/mazegen/events{/privacy}","received_events_url":"https://api.github.com/users/mazegen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-19T11:52:46Z","updated_at":"2015-10-19T14:18:48Z","closed_at":null,"body":"I can check if method has fat header using MethodBody.isTiny but I can't get the fat header size. It is usually 12 bytes but IIRC it is variable. It would be nice if dnlib can compute the size for me."},"comment":{"url":"https://api.github.com/repos/0xd4d/dnlib/issues/comments/149226378","html_url":"https://github.com/0xd4d/dnlib/issues/48#issuecomment-149226378","issue_url":"https://api.github.com/repos/0xd4d/dnlib/issues/48","id":149226378,"user":{"login":"0xd4d","id":1060731,"avatar_url":"https://avatars.githubusercontent.com/u/1060731?v=3","gravatar_id":"","url":"https://api.github.com/users/0xd4d","html_url":"https://github.com/0xd4d","followers_url":"https://api.github.com/users/0xd4d/followers","following_url":"https://api.github.com/users/0xd4d/following{/other_user}","gists_url":"https://api.github.com/users/0xd4d/gists{/gist_id}","starred_url":"https://api.github.com/users/0xd4d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xd4d/subscriptions","organizations_url":"https://api.github.com/users/0xd4d/orgs","repos_url":"https://api.github.com/users/0xd4d/repos","events_url":"https://api.github.com/users/0xd4d/events{/privacy}","received_events_url":"https://api.github.com/users/0xd4d/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T14:18:48Z","updated_at":"2015-10-19T14:18:48Z","body":"Reader: CilBody.HeaderSize: https://github.com/0xd4d/dnlib/blob/master/src/DotNet/Emit/MethodBody.cs#L89\r\n\r\nBut you seem to be talking about the writer's MethodBody class. It doesn't have a header size because it only writes 12-byte fat headers. You can safely assume that the fat header that the method body writer writes is 12 bytes. https://github.com/0xd4d/dnlib/blob/master/src/DotNet/Writer/MethodBodyWriter.cs#L126"}}