{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/4273","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/4273/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/4273/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/4273/events","html_url":"https://github.com/dotnet/roslyn/issues/4273","id":98471627,"number":4273,"title":"Proposal: IntPtr and UIntPtr Literals","user":{"login":"vcsjones","id":361677,"avatar_url":"https://avatars.githubusercontent.com/u/361677?v=3","gravatar_id":"","url":"https://api.github.com/users/vcsjones","html_url":"https://github.com/vcsjones","followers_url":"https://api.github.com/users/vcsjones/followers","following_url":"https://api.github.com/users/vcsjones/following{/other_user}","gists_url":"https://api.github.com/users/vcsjones/gists{/gist_id}","starred_url":"https://api.github.com/users/vcsjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcsjones/subscriptions","organizations_url":"https://api.github.com/users/vcsjones/orgs","repos_url":"https://api.github.com/users/vcsjones/repos","events_url":"https://api.github.com/users/vcsjones/events{/privacy}","received_events_url":"https://api.github.com/users/vcsjones/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Language%20Design","name":"Area-Language Design","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-31T21:08:56Z","updated_at":"2015-08-24T08:09:53Z","closed_at":null,"body":"I propose that literal suffixes for IntPtr and UIntPtr be added. For example:\r\n\r\n    var example1 = 2n;\r\n    var example2 = 2un;\r\n    var example3 = -1n;\r\n\r\nWhere the literal is equivalent to `new IntPtr(2)`, `new UIntPtr(2)`, and `new IntPtr(-1)` respectively.\r\n\r\nThe primary need for this is platform invoke. Many Win32 APIs take magic handle values, or null (0n). This would also bring parity to F# which already supports this feature."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/134085209","html_url":"https://github.com/dotnet/roslyn/issues/4273#issuecomment-134085209","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/4273","id":134085209,"user":{"login":"paulomorgado","id":470455,"avatar_url":"https://avatars.githubusercontent.com/u/470455?v=3","gravatar_id":"","url":"https://api.github.com/users/paulomorgado","html_url":"https://github.com/paulomorgado","followers_url":"https://api.github.com/users/paulomorgado/followers","following_url":"https://api.github.com/users/paulomorgado/following{/other_user}","gists_url":"https://api.github.com/users/paulomorgado/gists{/gist_id}","starred_url":"https://api.github.com/users/paulomorgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulomorgado/subscriptions","organizations_url":"https://api.github.com/users/paulomorgado/orgs","repos_url":"https://api.github.com/users/paulomorgado/repos","events_url":"https://api.github.com/users/paulomorgado/events{/privacy}","received_events_url":"https://api.github.com/users/paulomorgado/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T08:09:53Z","updated_at":"2015-08-24T08:09:53Z","body":"@axel-habermaier, the point of the discussion is that, the only way to have a native integer is to use an `IntPtr`. Thus, every value is needed."}}