Reputation: 7289
Currently I'm using
JavaScriptSerializer js = new JavaScriptSerializer();
context.Response.Write(js.Serialize(ds));
So what is the shorthand form the the same?
I remember seeing Serialize
called in one line itself in one of the questions in stackoverflow, but i forgot where i saw that.
Upvotes: 1
Views: 98
Reputation: 44438
Just don't assign it to an intermediate variable.
context.Response.Write(new JavaScriptSerializer().Serialize(ds));
Upvotes: 4