Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it usefull in Edge context to have in C# dictionary initializer more compatible with JS? #355

Closed
comdiv opened this issue Nov 23, 2015 · 0 comments

Comments

@comdiv
Copy link

comdiv commented Nov 23, 2015

Have post dotnet/roslyn#6965 that couse some discussion and holywars, while by it's motivated by using ElasticSearch, Mongo and some REST APIs from C# - may be it's concordant with Edge issues.

Idea is to supply dictioary literal that creates Dictionary<stirng,object> with syntax close to JS:

var d = {x:1, y:{z:2}, a:[1,2]};
//translated to
var d  = new Dictionary<string,object>{["x"] = 1,["y"]=new Dictionary<string,object>{["z"] = 2}, ["a"] = new List<object>{1,2}}
@agracio agracio closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants