{"action":"created","issue":{"url":"https://api.github.com/repos/dennisdoomen/CSharpGuidelines/issues/120","repository_url":"https://api.github.com/repos/dennisdoomen/CSharpGuidelines","labels_url":"https://api.github.com/repos/dennisdoomen/CSharpGuidelines/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/dennisdoomen/CSharpGuidelines/issues/120/comments","events_url":"https://api.github.com/repos/dennisdoomen/CSharpGuidelines/issues/120/events","html_url":"https://github.com/dennisdoomen/CSharpGuidelines/issues/120","id":267648912,"number":120,"title":"Rule: Using directives inside/outside namespace declarations","user":{"login":"bkoelman","id":10324372,"avatar_url":"https://avatars1.githubusercontent.com/u/10324372?v=4","gravatar_id":"","url":"https://api.github.com/users/bkoelman","html_url":"https://github.com/bkoelman","followers_url":"https://api.github.com/users/bkoelman/followers","following_url":"https://api.github.com/users/bkoelman/following{/other_user}","gists_url":"https://api.github.com/users/bkoelman/gists{/gist_id}","starred_url":"https://api.github.com/users/bkoelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkoelman/subscriptions","organizations_url":"https://api.github.com/users/bkoelman/orgs","repos_url":"https://api.github.com/users/bkoelman/repos","events_url":"https://api.github.com/users/bkoelman/events{/privacy}","received_events_url":"https://api.github.com/users/bkoelman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-23T12:28:35Z","updated_at":"2017-10-23T12:34:48Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Should using directives be defined outside or inside namespace declarations?\r\n\r\n```csharp\r\n// outside\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace Company.Product.Subsystem\r\n{\r\n    public class Customer\r\n    {\r\n        // ...\r\n    }\r\n}\r\n```\r\n\r\n```csharp\r\nnamespace Company.Product.Subsystem\r\n{\r\n    // inside\r\n    using System;\r\n    using System.Collections.Generic;\r\n\r\n    public class Customer\r\n    {\r\n        // ...\r\n    }\r\n}\r\n```\r\n\r\nAnd why should we have a rule for that?\r\n\r\nFrom https://stackoverflow.com/questions/125319/should-using-statements-be-inside-or-outside-the-namespace#16092975:\r\n> It is always dangerous to move the usings from one location to another because the search hierarchy changes, and another type may be found. Therefore, choose one convention and stick to it, so that you won't have to ever move usings."},"comment":{"url":"https://api.github.com/repos/dennisdoomen/CSharpGuidelines/issues/comments/338644260","html_url":"https://github.com/dennisdoomen/CSharpGuidelines/issues/120#issuecomment-338644260","issue_url":"https://api.github.com/repos/dennisdoomen/CSharpGuidelines/issues/120","id":338644260,"user":{"login":"dennisdoomen","id":572734,"avatar_url":"https://avatars3.githubusercontent.com/u/572734?v=4","gravatar_id":"","url":"https://api.github.com/users/dennisdoomen","html_url":"https://github.com/dennisdoomen","followers_url":"https://api.github.com/users/dennisdoomen/followers","following_url":"https://api.github.com/users/dennisdoomen/following{/other_user}","gists_url":"https://api.github.com/users/dennisdoomen/gists{/gist_id}","starred_url":"https://api.github.com/users/dennisdoomen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennisdoomen/subscriptions","organizations_url":"https://api.github.com/users/dennisdoomen/orgs","repos_url":"https://api.github.com/users/dennisdoomen/repos","events_url":"https://api.github.com/users/dennisdoomen/events{/privacy}","received_events_url":"https://api.github.com/users/dennisdoomen/received_events","type":"User","site_admin":false},"created_at":"2017-10-23T12:34:48Z","updated_at":"2017-10-23T12:34:48Z","author_association":"OWNER","body":"I agree. "}}
{"actor":{"display_login":"dennisdoomen"}}