{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/docs/issues/5129","repository_url":"https://api.github.com/repos/dotnet/docs","labels_url":"https://api.github.com/repos/dotnet/docs/issues/5129/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/docs/issues/5129/comments","events_url":"https://api.github.com/repos/dotnet/docs/issues/5129/events","html_url":"https://github.com/dotnet/docs/issues/5129","id":319749258,"number":5129,"title":"What is the benifit using the default keyword ?","user":{"login":"Davilink","id":1498932,"avatar_url":"https://avatars2.githubusercontent.com/u/1498932?v=4","gravatar_id":"","url":"https://api.github.com/users/Davilink","html_url":"https://github.com/Davilink","followers_url":"https://api.github.com/users/Davilink/followers","following_url":"https://api.github.com/users/Davilink/following{/other_user}","gists_url":"https://api.github.com/users/Davilink/gists{/gist_id}","starred_url":"https://api.github.com/users/Davilink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Davilink/subscriptions","organizations_url":"https://api.github.com/users/Davilink/orgs","repos_url":"https://api.github.com/users/Davilink/repos","events_url":"https://api.github.com/users/Davilink/events{/privacy}","received_events_url":"https://api.github.com/users/Davilink/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-02T23:51:35Z","updated_at":"2018-05-03T17:46:42Z","closed_at":"2018-05-03T14:52:49Z","author_association":"NONE","body":"I tried to use this statement : \nprivate Dictionary<Guid, MessageData> socketDatas = default;\n\nI was expecting that \"socketDatas\" will contains an empty Dictionary, but instead i was null.\n\n\n\n\n---\n#### Document Details\n\n⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*\n\n* ID: 08344c62-6194-1057-e409-35d65fcab2cd\n* Version Independent ID: 53f08a66-f8b6-7953-d260-e52694934613\n* Content: [Default value expressions (C# Programming Guide)](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/default-value-expressions)\n* Content Source: [docs/csharp/programming-guide/statements-expressions-operators/default-value-expressions.md](https://github.com/dotnet/docs/blob/master/docs/csharp/programming-guide/statements-expressions-operators/default-value-expressions.md)\n* Service: **unspecified**\n* GitHub Login: @BillWagner\n* Microsoft Alias: **wiwagn**"},"comment":{"url":"https://api.github.com/repos/dotnet/docs/issues/comments/386379216","html_url":"https://github.com/dotnet/docs/issues/5129#issuecomment-386379216","issue_url":"https://api.github.com/repos/dotnet/docs/issues/5129","id":386379216,"user":{"login":"BillWagner","id":493969,"avatar_url":"https://avatars2.githubusercontent.com/u/493969?v=4","gravatar_id":"","url":"https://api.github.com/users/BillWagner","html_url":"https://github.com/BillWagner","followers_url":"https://api.github.com/users/BillWagner/followers","following_url":"https://api.github.com/users/BillWagner/following{/other_user}","gists_url":"https://api.github.com/users/BillWagner/gists{/gist_id}","starred_url":"https://api.github.com/users/BillWagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BillWagner/subscriptions","organizations_url":"https://api.github.com/users/BillWagner/orgs","repos_url":"https://api.github.com/users/BillWagner/repos","events_url":"https://api.github.com/users/BillWagner/events{/privacy}","received_events_url":"https://api.github.com/users/BillWagner/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T17:46:42Z","updated_at":"2018-05-03T17:46:42Z","author_association":"MEMBER","body":"I understand.  The advantage of `default` is that it works well with generics:\r\n\r\n`public class MyClass<T>\r\n{\r\n    private T thing = default; // works when T is a struct, interface, or class\r\n}\r\n```\r\n\r\nI understand your request, but I don't think the design team will make that change. It would be a serious breaking change.\r\n"}}
{"actor":{"display_login":"BillWagner"}}