{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/4423","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/4423/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/4423/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/4423/events","html_url":"https://github.com/dotnet/roslyn/issues/4423","id":99703507,"number":4423,"title":"Proposal: Inferred type for const","user":{"login":"KimTranjan","id":312880,"avatar_url":"https://avatars.githubusercontent.com/u/312880?v=3","gravatar_id":"","url":"https://api.github.com/users/KimTranjan","html_url":"https://github.com/KimTranjan","followers_url":"https://api.github.com/users/KimTranjan/followers","following_url":"https://api.github.com/users/KimTranjan/following{/other_user}","gists_url":"https://api.github.com/users/KimTranjan/gists{/gist_id}","starred_url":"https://api.github.com/users/KimTranjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KimTranjan/subscriptions","organizations_url":"https://api.github.com/users/KimTranjan/orgs","repos_url":"https://api.github.com/users/KimTranjan/repos","events_url":"https://api.github.com/users/KimTranjan/events{/privacy}","received_events_url":"https://api.github.com/users/KimTranjan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/4%20-%20In%20Review","name":"4 - In Review","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Language%20Design","name":"Area-Language Design","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"CyrusNajmabadi","id":4564579,"avatar_url":"https://avatars.githubusercontent.com/u/4564579?v=3","gravatar_id":"","url":"https://api.github.com/users/CyrusNajmabadi","html_url":"https://github.com/CyrusNajmabadi","followers_url":"https://api.github.com/users/CyrusNajmabadi/followers","following_url":"https://api.github.com/users/CyrusNajmabadi/following{/other_user}","gists_url":"https://api.github.com/users/CyrusNajmabadi/gists{/gist_id}","starred_url":"https://api.github.com/users/CyrusNajmabadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyrusNajmabadi/subscriptions","organizations_url":"https://api.github.com/users/CyrusNajmabadi/orgs","repos_url":"https://api.github.com/users/CyrusNajmabadi/repos","events_url":"https://api.github.com/users/CyrusNajmabadi/events{/privacy}","received_events_url":"https://api.github.com/users/CyrusNajmabadi/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-08-07T18:31:01Z","updated_at":"2015-12-14T17:46:34Z","closed_at":null,"body":"# Background\r\nWould be great to have a shorter way to define a constant. I think that defining the type is redundant and unnecessary.\r\n\r\n```c#\r\npublic const string Subject = \"Welcome :)\";\r\n\r\ninternal const decimal planPrice = 10;\r\n\r\nconst int months = 12;\r\n```\r\n\r\n# Solution\r\n\r\nJust define your constant without the type.\r\n\r\n```c#\r\npublic const Subject = \"Welcome :)\";\r\n\r\ninternal const planPrice = 10M;\r\n\r\nconst months = 12;\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/164507469","html_url":"https://github.com/dotnet/roslyn/issues/4423#issuecomment-164507469","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/4423","id":164507469,"user":{"login":"alrz","id":3105979,"avatar_url":"https://avatars.githubusercontent.com/u/3105979?v=3","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T17:46:34Z","updated_at":"2015-12-14T17:46:34Z","body":"Just to mention,\r\n```cs\r\nfrom foo ...\r\nfrom T foo ...\r\nlet foo = ...\r\nlet T foo = ...\r\nreadonly foo = ...\r\nreadonly T foo = ...\r\nconst foo = ...\r\nconst T foo = ...\r\n```\r\nIt'll be actually more consistent without `var`."}}